]> andersk Git - splint.git/blobdiff - src/clabstract.c
Merged this branch with the one in the splint.sf.net repository.
[splint.git] / src / clabstract.c
index a100791f4ec0b2313ce8e45ed2066460ebbea10a..464faee10a8bfc260fbebe4d697bb5518ac8106e 100644 (file)
@@ -957,23 +957,12 @@ checkTypeDecl (uentry e, ctype rep)
                      uentry ue = usymtab_lookupSafe (ye);
 
                      llassert (uentry_isEitherConstant (ue));
-
-                     /* evans 2002-04-22 */
-                     if (ctype_isBool (uentry_getType (ue)))
-                       {
-                         /*
-                         ** If set using -booltrue or -boolfalse, don't change the type.
-                         */
-                       }
-                     else
-                       {
-                         llassertprint (ctype_match (uentry_getType (ue), rrep),
-                                        ("Bad enum: %s / %s",
-                                         uentry_unparse (ue),
-                                         ctype_unparse (rrep)));
-                         
-                         uentry_setType (ue, at);
-                       }
+                     llassertprint (ctype_match (uentry_getType (ue), rrep),
+                                    ("Bad enum: %s / %s",
+                                     uentry_unparse (ue),
+                                     ctype_unparse (rrep)));
+                     
+                     uentry_setType (ue, at);
                    }
                } end_enumNameList_elements;
            }
@@ -1810,7 +1799,7 @@ handleEnum (cstring id)
     }
   else
     {
-      return (ctype_createForwardEnum (id));
+      return (declareEnum (id, enumNameList_new ()));
     }
 }
 
@@ -2165,7 +2154,6 @@ sRef checkStateClausesId (uentry ue)
 
 sRef checkbufferConstraintClausesId (uentry ue)
 {
-  sRef sr;
   cstring s = uentry_rawName (ue);
 
   if (cstring_equalLit (s, "result"))
@@ -2180,14 +2168,8 @@ sRef checkbufferConstraintClausesId (uentry ue)
        }
     }
   
-  DPRINTF (("constraint id: %s", uentry_unparseFull (ue)));
-  sr = uentry_getSref (ue);
-
-  if (sRef_isInvalid (sr) )
-    {
-      llfatalerrorLoc (cstring_makeLiteral("Macro defined constants can not be used in function constraints unless they are specifed with the constant annotation.  To use a macro defined constant include an annotation of the form /*@constant <type> <name>=<value>@*/ somewhere before the function constraint.  This restriction may be removed in future releases if it is determined to be excessively burdensome." ));
-    }
-  return sRef_saveCopy (sr); /*@i523 why the saveCopy? */
+  DPRINTF (("constrant id: %s", uentry_unparseFull (ue)));
+  return sRef_saveCopy (uentry_getSref (ue)); /*@i523 why the saveCopy? */
 }
 
 void checkModifiesId (uentry ue)
@@ -2411,7 +2393,10 @@ static void clabstract_prepareFunction (uentry e)
 sRef clabstract_checkGlobal (exprNode e)
 {
   sRef s;
-  llassert (exprNode_isInitializer (e));
+  
+  // drl 04-19-2002 comment this out for now
+  // parse chanes cause this to fail..
+  //llassert (exprNode_isInitializer (e));
 
   s = exprNode_getSref (e);
   DPRINTF (("Initializer: %s -> %s", exprNode_unparse (e), sRef_unparse (s)));
This page took 0.036008 seconds and 4 git commands to generate.