]> andersk Git - splint.git/blobdiff - src/cgrammar.y
Tried to fix some problems with the configuration system.
[splint.git] / src / cgrammar.y
index 44f4c91e51dc6491344befb14220de8149e93b90..701ccce4261bed8d4cb8e057d4df5ac6514846d1 100644 (file)
@@ -361,8 +361,16 @@ namedDeclBase
  | namedDeclBase TLSQBR TRSQBR 
    { $$ = idDecl_replaceCtype ($1, ctype_makeArray (idDecl_getCtype ($1))); }
  | namedDeclBase TLSQBR IsType constantExpr TRSQBR NotType
-   { 
-     $$ = idDecl_replaceCtype ($1, ctype_makeFixedArray (idDecl_getCtype ($1), exprNode_getLongValue ($4)));
+   {
+     exprNode_findValue($4);
+     if (exprNode_hasValue ($4)) 
+       {
+        $$ = idDecl_replaceCtype ($1, ctype_makeFixedArray (idDecl_getCtype ($1), exprNode_getLongValue ($4)));
+       } 
+     else
+       {
+        $$ = idDecl_replaceCtype ($1, ctype_makeArray (idDecl_getCtype ($1))); 
+       }
    }
  | namedDeclBase PushType TLPAREN TRPAREN 
    { setCurrentParams (uentryList_missingParams); }
@@ -696,7 +704,7 @@ fcnDef
  : fcnDefHdr fcnBody 
    { 
      context_setFunctionDefined (exprNode_loc ($2)); 
-     exprNode_checkFunction (context_getHeader (), $2); 
+     exprNode_checkFunction (context_getHeader (),  $2); 
      /* DRL 8 8 2000 */
      
      context_exitFunction ();
This page took 0.039077 seconds and 4 git commands to generate.