]> andersk Git - splint.git/blobdiff - src/context.c
Fixed problem with NULL being changed.
[splint.git] / src / context.c
index ad99f1366081ff4bdeddab83f3d79786dac5ff0a..092eecf2205263b77775d2eb53705138afa28479 100644 (file)
@@ -102,6 +102,7 @@ static struct
   clause inclause;
 
   int numerrors;
+  int numbugs;
 
   filelocStack locstack;
   fileTable ftab;
@@ -843,13 +844,13 @@ context_resetAllFlags (void)
   gc.flags[FLG_NULLINIT] = TRUE;
 
   gc.flags[FLG_STRINGLITTOOLONG] = TRUE;
-
+  gc.flags[FLG_MACROCONSTDIST] = TRUE;
   gc.flags[FLG_LIKELYBOOL] = TRUE;
   gc.flags[FLG_ZEROPTR] = TRUE;
   gc.flags[FLG_NUMLITERAL] = TRUE;
   gc.flags[FLG_DUPLICATEQUALS] = TRUE;
   gc.flags[FLG_SKIPISOHEADERS] = TRUE;
-  gc.flags[FLG_SKIPPOSIXHEADERS] = TRUE;
+  gc.flags[FLG_SKIPPOSIXHEADERS] = FALSE;
   gc.flags[FLG_SYSTEMDIREXPAND] = TRUE;
   gc.flags[FLG_UNRECOGCOMMENTS] = TRUE;
   gc.flags[FLG_UNRECOGFLAGCOMMENTS] = TRUE;
@@ -934,7 +935,7 @@ context_resetAllFlags (void)
   ** On by default for Win32, but not Unix
   */
 
-# ifdef WIN32
+# if defined (WIN32) || defined (OS2)
   gc.flags[FLG_PARENFILEFORMAT] = TRUE;
   gc.flags[FLG_CASEINSENSITIVEFILENAMES] = TRUE;
 # endif
@@ -1234,7 +1235,7 @@ context_setModeAux (cstring s, bool warn)
          FLG_CHECKSTRICTGLOBALS, FLG_IMPCHECKEDSPECGLOBALS,
           FLG_MACROMATCHNAME, FLG_WARNLINTCOMMENTS,
          FLG_INCLUDENEST, FLG_ISORESERVED, FLG_CPPNAMES, 
-         FLG_NOPARAMS, FLG_IFEMPTY, FLG_WHILEEMPTY, FLG_REALCOMPARE,
+         FLG_NOPARAMS, FLG_IFEMPTY, FLG_WHILEEMPTY, FLG_REALCOMPARE, FLG_REALRELATECOMPARE,
          FLG_BOOLOPS, FLG_SHIFTNEGATIVE,
          FLG_SHIFTIMPLEMENTATION,
          FLG_BUFFEROVERFLOWHIGH, FLG_BUFFEROVERFLOW,
@@ -1370,7 +1371,7 @@ context_setModeAux (cstring s, bool warn)
          FLG_FOREMPTY, FLG_WHILEEMPTY,
          FLG_IFEMPTY, FLG_IFBLOCK,
          FLG_ELSEIFCOMPLETE,
-         FLG_REALCOMPARE, FLG_BOOLOPS,
+         FLG_REALCOMPARE, FLG_BOOLOPS, FLG_REALRELATECOMPARE,
          FLG_SYSTEMDIRERRORS, FLG_UNUSEDSPECIAL,
 
          FLG_SHIFTNEGATIVE,
@@ -1578,7 +1579,7 @@ context_enterUnknownMacro (/*@dependent@*/ uentry e)
 
 void context_enterAndClause (exprNode e)
 {
-  
+  DPRINTF (("enter and clause: %s", exprNode_unparse (e)));
   usymtab_trueBranch (guardSet_copy (exprNode_getGuards (e)));
   pushClause (ANDCLAUSE);
 }
@@ -3054,6 +3055,18 @@ context_resetErrors (void)
   gc.numerrors = 0;
 }
 
+void
+context_recordBug (void)
+{
+  gc.numbugs++;
+}
+
+int
+context_numBugs (void)
+{
+  return gc.numbugs;
+}
+
 void context_initMod (void)
    /*@globals undef gc; @*/
 {
@@ -3064,6 +3077,7 @@ void context_initMod (void)
 
   gc.instandardlib = FALSE;
   gc.numerrors = 0;
+  gc.numbugs = 0;
   gc.neednl = FALSE;
   gc.linesprocessed = 0;
   gc.speclinesprocessed = 0;
This page took 0.044442 seconds and 4 git commands to generate.