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;
}
}
else
{
- return (ctype_createForwardEnum (id));
+ return (declareEnum (id, enumNameList_new ()));
}
}
sRef checkbufferConstraintClausesId (uentry ue)
{
- sRef sr;
cstring s = uentry_rawName (ue);
if (cstring_equalLit (s, "result"))
}
}
- 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)
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)));