/*
-** LCLint - annotation-assisted static program checker
+** Splint - annotation-assisted static program checker
** Copyright (C) 1994-2001 University of Virginia,
** Massachusetts Institute of Technology
**
**
** For information on lclint: lclint-request@cs.virginia.edu
** To report a bug: lclint-bug@cs.virginia.edu
-** For more information: http://lclint.cs.virginia.edu
+** For more information: http://www.splint.org
*/
/*
** context.c
gc.flags[FLG_NESTCOMMENT] = TRUE;
gc.flags[FLG_GLOBALS] = TRUE;
gc.flags[FLG_FULLINITBLOCK] = TRUE;
+ gc.flags[FLG_INITSIZE] = TRUE;
+ gc.flags[FLG_INITALLELEMENTS] = TRUE;
+
+ gc.flags[FLG_STRINGLITTOOLONG] = TRUE;
+
gc.flags[FLG_LIKELYBOOL] = TRUE;
gc.flags[FLG_ZEROPTR] = TRUE;
gc.flags[FLG_NUMLITERAL] = TRUE;
gc.flags[FLG_FORMATTYPE] = TRUE;
gc.flags[FLG_BADFLAG] = TRUE;
gc.flags[FLG_WARNFLAGS] = TRUE;
+ gc.flags[FLG_WARNRC] = TRUE;
gc.flags[FLG_FILEEXTENSIONS] = TRUE;
gc.flags[FLG_WARNUNIXLIB] = TRUE;
gc.flags[FLG_WARNPOSIX] = TRUE;
flagcode modeflags[] =
{
FLG_ENUMINT, FLG_MACROMATCHNAME,
+ FLG_STRINGLITNOROOM,
FLG_MACROUNDEF, FLG_RELAXQUALS,
FLG_USEALLGLOBS, FLG_CHECKSTRICTGLOBALS,
FLG_CHECKSTRICTGLOBALIAS,
FLG_CHECKMODGLOBALIAS,
FLG_UNCHECKEDGLOBALIAS,
FLG_FORMATCONST,
+ FLG_STRINGLITNOROOM,
+ FLG_STRINGLITSMALLER,
FLG_EXITARG, FLG_PTRNUMCOMPARE,
FLG_BOOLCOMPARE, FLG_UNSIGNEDCOMPARE,
FLG_MACROUNDEF, FLG_MUSTMOD, FLG_ALLGLOBALS,
FLG_MODFILESYSTEM,
FLG_MACROMATCHNAME,
FLG_FORMATCONST,
+ FLG_STRINGLITNOROOM,
+ FLG_STRINGLITSMALLER,
FLG_STATETRANSFER, FLG_STATEMERGE,
FLG_MACROUNDEF, FLG_MUTREP, FLG_MUSTMOD,
FLG_ALLGLOBALS, FLG_IMPTYPE,
}
if (cstring_length (val) >= 1
- && cstring_firstChar (val) == '"')
+ && cstring_firstChar (val) == '\"')
{
llerror_flagWarning (message
("setting %s to string beginning with \". You probably "
{
if (gc.kind != CX_GLOBAL)
{
- llcontbug (message ("Not in global scope as expected: %q", context_unparse ()));
- context_quietExitScopes ();
+ if (context_inMacro ())
+ {
+ ; /* evans 2001-10-14: Okay to be in a macro here! */
+ }
+ else
+ {
+ llcontbug (message ("Not in global scope as expected: %q", context_unparse ()));
+ context_quietExitScopes ();
+ }
}
}