ifeq ($(CHECK), 1)
${MAKE} $*.check
endif
- @echo '// Compiling '$*.c' / compiled: '`$(OFILES)`' (of 181 files)'
$(CC) $(CPPFLAGS) $(CFLAGS) -c $*.c
+### removed this: / compiled: '`$(OFILES)`' (of 181 files)'
+### Apparently it is slow on some platforms...
+
+
###
### alternatives (tests, releases, backups, etc.)
###
cd ~/temp/lclint-`cat ${VERSION_NUMBER}`; rm -r test/temp
cd ~/temp/lclint-`cat ${VERSION_NUMBER}`; rm -f *~ */*~ */*/*~ #* */#* */*/#* .#* */.#* */*/.#* */*.core
cd ~/temp/lclint-`cat ${VERSION_NUMBER}`; rm -rf CVS */CVS */*/CVS */*/*/CVS */*/*/*/CVS
- cd ~/temp/; tar czvf ~/public_html/lclint/lclint-`cat ${SRCPWD}/${VERSION_NUMBER}`.src.tgz lclint-`cat ${SRCPWD}/${VERSION_NUMBER}`
- chmod 644 ~/public_html/lclint/lclint-`cat ${SRCPWD}/${VERSION_NUMBER}`.src.tgz
- ls -l ~/public_html/lclint/lclint-*.tgz
+ cd ~/temp/; tar czvf ~/public_html/lclint/downloads/lclint-`cat ${SRCPWD}/${VERSION_NUMBER}`.src.tgz lclint-`cat ${SRCPWD}/${VERSION_NUMBER}`
+ chmod 644 ~/public_html/lclint/downloads/lclint-`cat ${SRCPWD}/${VERSION_NUMBER}`.src.tgz
+ ls -l ~/public_html/lclint/downloads/lclint-*.tgz
@echo "Made release lclint-`cat ${VERSION_NUMBER}`"
opt :
}
if (cstring_length (val) >= 1
- && cstring_firstChar (val) == '"')
+ && cstring_firstChar (val) == '\"')
{
llerror_flagWarning (message
("setting %s to string beginning with \". You probably "
exp_p--;
SKIP_WHITE_SPACE (p);
if (p == limit || ! is_idstart[(int) *p]
- || (*p == 'L' && p + 1 < limit && (p[1] == '\'' || p[1] == '"')))
+ || (*p == 'L' && p + 1 < limit && (p[1] == '\'' || p[1] == '\"')))
cppReader_errorLit (pfile,
cstring_makeLiteralTemp ("`#' operator is not followed by a macro argument name"));
else
id_len = p - id_beg;
if (is_idstart[(int) c]
- && ! (id_len == 1 && c == 'L' && (*p == '\'' || *p == '"'))) {
+ && ! (id_len == 1 && c == 'L' && (*p == '\'' || *p == '\"'))) {
register struct arglist *arg;
for (arg = arglist; arg != NULL; arg = arg->next) {
SKIP_WHITE_SPACE (bp);
} else {
switch (*bp) {
- case '!': case '"': case '#': case '%': case '&': case '\'':
+ case '!': case '\"': case '#': case '%': case '&': case '\'':
case ')': case '*': case '+': case ',': case '-': case '.':
case '/': case ':': case ';': case '<': case '=': case '>':
case '?': case '[': case '\\': case ']': case '^': case '{':
sym_length = size_fromInt (p - symname);
if (sym_length == 0
- || (sym_length == 1 && *symname == 'L' && (*p == '\'' || *p == '"')))
+ || (sym_length == 1 && *symname == 'L' && (*p == '\'' || *p == '\"')))
cppReader_error (pfile, message ("invalid %s name", usage));
else if (!is_idstart[(int) *symname])
{
if (!is_idstart[(int) *ip->cur])
goto oops;
- if (ip->cur[0] == 'L' && (ip->cur[1] == '\'' || ip->cur[1] == '"'))
+ if (ip->cur[0] == 'L' && (ip->cur[1] == '\'' || ip->cur[1] == '\"'))
goto oops;
if ((hp = cppReader_lookup (ip->cur, -1, -1)) != 0)
if (c >= '0' && c <= '7') {
tval = (int) c - (int) '0';
+ } else if (c == 'U' || c == 'L' || c == 'u' || c == 'l') {
+ index++;
+ while (yytext[index] != '\0') {
+ if (c == 'U' || c == 'L' || c == 'u' || c == 'l') {
+ ;
+ } else {
+ voptgenerror
+ (FLG_SYNTAX,
+ message ("Invalid character (%c) following specifier in octal constant: %s",
+ c, cstring_fromChars (yytext)),
+ g_currentloc);
+ }
+ index++;
+ }
+
+ break;
} else {
voptgenerror
(FLG_SYNTAX,
return (s);
}
-static cstring
+static /*@unused@*/ cstring
listModes (void)
{
cstring s = cstring_makeLiteral ("\t");
exit ((status == LLSUCCESS) ? EXIT_SUCCESS : EXIT_FAILURE);
}
+/*
+** This shouldn't be necessary, but Apple Darwin can't handle '"''s.
+*/
+
void
loadrc (/*:open:*/ FILE *rcfile, cstringSList *passThroughArgs)
/*@ensures closed rcfile@*/
}
else if (flagcode_hasString (opt))
{
- if (cstring_firstChar (extra) == '"')
+ if (cstring_firstChar (extra) == '\"')
{
- if (cstring_lastChar (extra) == '"')
+ if (cstring_lastChar (extra) == '\"')
{
char *extras = cstring_toCharsSafe (extra);
- llassert (extras[strlen(extras) - 1] == '"');
+ llassert (extras[strlen(extras) - 1] == '\"');
extras[strlen(extras) - 1] = '\0';
extra = cstring_fromChars (extras + 1);
- DPRINTF (("Remove quites: %s", extra));
+ DPRINTF (("Remove quotes: %s", extra));
}
else
{
.PHONY: compdestroy constannot controldepth csyntax czechnames czechoslovaknames
.PHONY: deadparam decl enum exports external fields fileio flags forbody format funcpointer glob globals
.PHONY: impabstract init inparam internal iter keep libs lintcomments
-.PHONY: list macros macrosef merge mergestate modifies modtest moduncon mongoincludes
+.PHONY: list longconstants macros macrosef merge mergestate modifies modtest moduncon mongoincludes
.PHONY: noeffect null observer oldstyle outglob outparam postnotnull preds prefixes printflike rc
.PHONY: refcounts release repexpose returned sharing slovaknames special
.PHONY: specclauses stack staticarray
abstptr abstract alias alttypes ansireserved argorder args blocks branchstate break cases cast \
charlit clauses commentchar compdestroy constannot controldepth csyntax czechnames czechoslovaknames deadparam \
decl enum exports external fields flags forbody format freearray funcpointer glob globals impabstract \
- init inparam internal iter keep libs linked lintcomments list macros macrosef merge modifies \
+ init inparam internal iter keep libs linked lintcomments list longconstants macros macrosef merge modifies \
modtest moduncon mongoincludes mystrncat noeffect null observer oldstyle \
outglob outparam postnotnull preds prefixes \
printflike rc refcounts release repexpose returned sharing slovaknames specclauses special stack \
list:
$(LCLINTR) list.c -expect 3
+longconstants:
+ $(LCLINTR) longconstants.c -expect 1
+
macros:
$(LCLINTR) macros -expect 17
$(LCLINTR) macros.c +allmacros -expect 34
--- /dev/null
+long octlong = 07L;
+long hexlong = 0x34L;
+long llong = 3594UL;
+unsigned long ullong = 3594UL;
--- /dev/null
+
+longconstants.c:3:14: Variable llong initialized to type unsigned long int,
+ expects long int: 3594UL
+
+Finished LCLint checking --- 1 code error found, as expected