]> andersk Git - splint.git/blobdiff - src/context.c
*** empty log message ***
[splint.git] / src / context.c
index 76be59280109adce3397a15d21be52091d656840..0427cfc9624bb9a741effc70570cd606119167ea 100644 (file)
@@ -1378,9 +1378,17 @@ context_removeFileAccessType (typeId t)
 
 void context_enterFunctionHeader (void)
 {
-  llassert (gc.kind == CX_GLOBAL);
-  DPRINTF (("Enter function header!"));
-  gc.inFunctionHeader = TRUE;
+  if (gc.kind != CX_GLOBAL)
+    {
+      llparseerror (cstring_makeLiteral
+                   ("Likely parse error.  Function header outside global context."));
+    }
+  else
+    {
+      llassert (gc.kind == CX_GLOBAL);
+      DPRINTF (("Enter function header!"));
+      gc.inFunctionHeader = TRUE;
+    }
 }
 
 void context_exitFunctionHeader (void)
This page took 0.135231 seconds and 4 git commands to generate.