]> andersk Git - splint.git/commitdiff
*** empty log message ***
authorevans <evans>
Fri, 6 Jul 2001 23:16:11 +0000 (23:16 +0000)
committerevans <evans>
Fri, 6 Jul 2001 23:16:11 +0000 (23:16 +0000)
src/Headers/herald.h
src/Headers/herald.last
src/Headers/local_constants.h
src/Headers/local_constants.last
src/cgrammar.y
src/clabstract.c
src/sRef.c
src/transferChecks.c
test/init.out

index 5920a7a25e23cbd36eeb63499b9d4b800880dabb..b0c1a785d1daa9bd3d23635602020ef1cb2a028d 100644 (file)
@@ -4,4 +4,4 @@
 /*@constant observer char *LCL_PARSE_VERSION;@*/
 # define LCL_PARSE_VERSION "LCLint 3.0b-alpha"
 /*@constant observer char *LCL_COMPILE;@*/
-# define LCL_COMPILE "Compiled using gcc -DSTDC_HEADERS=1 -g -Wall on Linux fowler 2.4.3-12 #1 Fri Jun 8 13:35:30 EDT 2001 i686 unknown by drl7x"
+# define LCL_COMPILE "Compiled using gcc -Wall -g on Linux paisley 2.4.3-12 #1 Fri Jun 8 13:35:30 EDT 2001 i686 unknown by evans"
index 5920a7a25e23cbd36eeb63499b9d4b800880dabb..b0c1a785d1daa9bd3d23635602020ef1cb2a028d 100644 (file)
@@ -4,4 +4,4 @@
 /*@constant observer char *LCL_PARSE_VERSION;@*/
 # define LCL_PARSE_VERSION "LCLint 3.0b-alpha"
 /*@constant observer char *LCL_COMPILE;@*/
-# define LCL_COMPILE "Compiled using gcc -DSTDC_HEADERS=1 -g -Wall on Linux fowler 2.4.3-12 #1 Fri Jun 8 13:35:30 EDT 2001 i686 unknown by drl7x"
+# define LCL_COMPILE "Compiled using gcc -Wall -g on Linux paisley 2.4.3-12 #1 Fri Jun 8 13:35:30 EDT 2001 i686 unknown by evans"
index 73e13fc02ff2ff0ec28919e4f5adc9cc5c4dac80..c4c3a887ac645344e32355e5979556d4d408aa9a 100644 (file)
@@ -2,6 +2,6 @@
 /*@constant observer char *SYSTEM_LIBDIR;@*/
 # define SYSTEM_LIBDIR "/usr/include"
 /*@constant observer char *DEFAULT_LARCHPATH;@*/
-# define DEFAULT_LARCHPATH ".:/af9/drl7x/re3/LCLintDev/lib"
+# define DEFAULT_LARCHPATH "/usr/local/lclint-2.5m/lib"
 /*@constant observer char *DEFAULT_LCLIMPORTDIR;@*/
-# define DEFAULT_LCLIMPORTDIR "/af9/drl7x/re3/LCLintDev/imports"
+# define DEFAULT_LCLIMPORTDIR "/usr/local/lclint-2.5m/imports"
index 73e13fc02ff2ff0ec28919e4f5adc9cc5c4dac80..c4c3a887ac645344e32355e5979556d4d408aa9a 100644 (file)
@@ -2,6 +2,6 @@
 /*@constant observer char *SYSTEM_LIBDIR;@*/
 # define SYSTEM_LIBDIR "/usr/include"
 /*@constant observer char *DEFAULT_LARCHPATH;@*/
-# define DEFAULT_LARCHPATH ".:/af9/drl7x/re3/LCLintDev/lib"
+# define DEFAULT_LARCHPATH "/usr/local/lclint-2.5m/lib"
 /*@constant observer char *DEFAULT_LCLIMPORTDIR;@*/
-# define DEFAULT_LCLIMPORTDIR "/af9/drl7x/re3/LCLintDev/imports"
+# define DEFAULT_LCLIMPORTDIR "/usr/local/lclint-2.5m/imports"
index 3e8646ec1d0a3003f1434fca57a7b92b0bf9be8e..b9a41de92481dc2132603b704e931c258678df09 100644 (file)
@@ -1180,8 +1180,8 @@ suSpc
    TRBRACE 
    { $$ = declareUnnamedStruct ($7); }
  | NotType CUNION IsType TLBRACE { sRef_setGlobalScopeSafe (); } 
-   CreateStructInnerScope 
-   structDeclList DeleteStructInnerScope { sRef_clearGlobalScopeSafe (); }
+   CreateStructInnerScope structDeclList DeleteStructInnerScope 
+   { sRef_clearGlobalScopeSafe (); }
    TRBRACE 
    { $$ = declareUnnamedUnion ($7); } 
  | NotType CSTRUCT IsType TLBRACE TRBRACE
index db822877e72bf33e107f712fa9bded90270f267b..37974e12276c677287095a703a0a30a2f76ed3f5 100644 (file)
 ** right values are available in the right place.
 */
 
-/*drl*/
-/*@only@*/ static  constraintList fcnConstraints = NULL;
-
-/*end drl*/
-
 /*drl */
 static /*@only@*/   constraintList implicitFcnConstraints = NULL;
 
index 3425f6767ee45bd30dc008cba8747907aa9791c0..02647dd18662ef9d2219c3ba3e3822d47cb25043 100644 (file)
@@ -686,18 +686,31 @@ void sRef_clearGlobalScope ()
 }
 
 static bool oldInFunction = FALSE;
+static int nestedScope = 0;
 
 void sRef_setGlobalScopeSafe ()
 {
-  oldInFunction = inFunction;
-  DPRINTF (("leave function"));
+  if (nestedScope == 0)
+    {
+      oldInFunction = inFunction;
+    }
+  
+  nestedScope++;
+  DPRINTF (("leave function safe"));
   inFunction = FALSE;
 }
 
 void sRef_clearGlobalScopeSafe ()
 {
-    inFunction = oldInFunction;
-    DPRINTF (("clear function: %s", bool_unparse (inFunction)));
+  nestedScope--;
+  llassert (nestedScope >= 0);
+  
+  if (nestedScope == 0)
+    {
+      inFunction = oldInFunction;
+    }
+
+  DPRINTF (("clear function: %s", bool_unparse (inFunction)));
 }
 
 void sRef_enterFunctionScope ()
@@ -709,8 +722,7 @@ void sRef_enterFunctionScope ()
 }
 
 void sRef_exitFunctionScope ()
-{
-  
+{  
   if (inFunction)
     {
       DPRINTF (("Exit function scope."));
index 4d3f8511affcb6f1b5cc575c1f03d9f258f33e69..809db0a68d77854d5204e49869f4bd151e0effb5 100644 (file)
@@ -4002,7 +4002,7 @@ checkMetaStateTransfer (exprNode fexp, sRef fref, exprNode texp, sRef tref,
   valueTable tvalues = sRef_getValueTable (tref);
 
   DPRINTF (("Metastate transfer: from %s", exprNode_unparse (fexp)));
-
+  
   DPRINTF (("Metastate transfer: %s => %s",
            sRef_unparseFull (fref),
            sRef_unparseFull (tref)));
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..f87a9c24a4cc9fa4e7ee4c3ef491397413fdbecf 100644 (file)
@@ -0,0 +1,38 @@
+
+init.c:1:16: Global c[0] initialized to null value: c[0] = NULL
+init.c:1:43: Initial value of c[2][2] is type int, expects char: 3
+init.c:1:48: Global c[3] initialized to null value: c[3] = NULL
+init.c:4:23: Global st.uname initialized to null value: st.uname = NULL
+init.c:4:29: Initial value of st.y is type double, expects int: 1.2
+init.c:7:7: Initializer block for st2[0] has 3 fields, but struct { char *
+    name; int [] x; char * uname;, ... } has 4 fields: "bob", { 1, 2 }, NULL
+init.c:8:19: Initial value of st2[1].x is type int, expects int []: 3
+init.c:8:22: Global st2[1].uname initialized to null value: st2[1].uname = NULL
+init.c:10:27: Initial value of a[4] is type double, expects int: 3.4
+init.c:12:34: Initial value of aa[1][1] is type double, expects int: 3.2
+init.c:14:15: Initializer block used for b[0] where int is expected: { 1, 2 }
+init.c:14:25: Initializer block used for b[1] where int is expected: { 3, 4 }
+
+Finished LCLint checking --- 12 code errors found, as expected
+
+init.c:1:16: Global c[0] initialized to null value: c[0] = NULL
+init.c:1:22: Read-only string literal storage used as initial value for
+                unqualified storage: c[1] = "hullo"
+init.c:1:43: Initial value of c[2][2] is type int, expects char: 3
+init.c:1:48: Global c[3] initialized to null value: c[3] = NULL
+init.c:4:7: Read-only string literal storage used as initial value for
+               unqualified storage: st.name = "bob"
+init.c:4:23: Global st.uname initialized to null value: st.uname = NULL
+init.c:4:29: Initial value of st.y is type double, expects int: 1.2
+init.c:7:7: Initializer block for st2[0] has 3 fields, but struct { char *
+    name; int [] x; char * uname;, ... } has 4 fields: "bob", { 1, 2 }, NULL
+init.c:8:9: Read-only string literal storage used as initial value for
+               unqualified storage: st2[1].name = "charly"
+init.c:8:19: Initial value of st2[1].x is type int, expects int []: 3
+init.c:8:22: Global st2[1].uname initialized to null value: st2[1].uname = NULL
+init.c:10:27: Initial value of a[4] is type double, expects int: 3.4
+init.c:12:34: Initial value of aa[1][1] is type double, expects int: 3.2
+init.c:14:15: Initializer block used for b[0] where int is expected: { 1, 2 }
+init.c:14:25: Initializer block used for b[1] where int is expected: { 3, 4 }
+
+Finished LCLint checking --- 15 code errors found, as expected
This page took 0.126654 seconds and 5 git commands to generate.