/*drl 12 28 2000*/
e->info->fcn->postconditions = NULL;
/*end drl*/
-
+
+ e->cQuals = qualList_undefined;
+
checkGlobalsModifies (e, mods);
e->info->fcn->mods = mods;
{
if (qual_isCQual (qel))
{
- ; /* okay */
+ /*drl 04-19-2002
+ I'm now storing the C qualifiers in the uentry
+ This was necessary to get code generation to work
+ */
+ ue->cQuals = qualList_add(ue->cQuals, qel);
}
else
{
e->info->uconst->access = typeIdSet_undefined;
e->info->uconst->macro = macro;
+ e->cQuals = qualList_undefined;
+
uentry_setSpecDef (e, f);
if (multiVal_isInt (m) && (multiVal_forceInt (m) == 0))
}/* end else */
/* end modification */
+ e->cQuals = qualList_undefined;
+
return (e);
}
e->info->datatype->mut = mut;
e->info->datatype->type = ctype_undefined;
+ e->cQuals = qualList_undefined;
+
if (uentry_isDeclared (e))
{
uentry_setDefined (e, f);
e->info->iter->access = access;
e->info->iter->mods = sRefSet_undefined;
e->info->iter->globs = globSet_undefined;
-
+
+ e->cQuals = qualList_undefined;
+
uentry_checkIterArgs (e);
return (e);
}
e->info->enditer->access = access;
e->warn = warnClause_undefined; /*@i452@*/
+
+ e->cQuals = qualList_undefined;
+
return (e);
}
e->info->datatype->type = t;
e->warn = warnClause_undefined; /*@i452@*/
+ e->cQuals = qualList_undefined;
+
if (uentry_isDeclared (e))
{
uentry_setDefined (e, fl);
e->info->uconst = (ucinfo) dmalloc (sizeof (*e->info->uconst));
e->info->uconst->access = access;
e->info->uconst->macro = FALSE; /*@i523! fix this when macro info added to library */
+
+ e->cQuals = qualList_undefined;
+
uentry_setConstantValue (e, m);
sRef_storeState (e->sref);
/*DRL ADDED 9-1-2000 */
e->info->var->bufinfo = NULL;
+ e->cQuals = qualList_undefined;
+
return (e);
}
e->info->datatype->mut = mut;
e->info->datatype->type = rtype;
+ e->cQuals = qualList_undefined;
+
DPRINTF (("About to store: %s", sRef_unparseFull (e->sref)));
sRef_storeState (e->sref);
DPRINTF (("After store: %s", sRef_unparseFull (e->sref)));
-
+
return (e);
}
e->info->fcn->postconditions = NULL;
/* end drl */
+ e->cQuals = qualList_undefined;
+
return (e);
}
e->info->datatype->mut = MAYBE;
e->info->datatype->type = rtype;
+ e->cQuals = qualList_undefined;
+
sRef_storeState (e->sref);
return (e);
e->info->iter->access = access;
e->info->iter->mods = sRefSet_undefined;
e->info->iter->globs = globSet_undefined;
+
+ e->cQuals = qualList_undefined;
sRef_storeState (e->sref);
return (e);
e->info = (uinfo) dmalloc (sizeof (*e->info));
e->info->enditer = (ueinfo) dmalloc (sizeof (*e->info->enditer));
e->info->enditer->access = access;
+
+ e->cQuals = qualList_undefined;
+
sRef_storeState (e->sref);
return (e);
return (message ("%s %q", ctype_unparseDeep (v->utype), uentry_getName (v)));
}
+/*@only@*/ cstring
+uentry_unparseFunctionHeader (uentry v) /*@*/
+{
+ cstring st, cQuals, tmp, ret, storageSp;
+
+ if (uentry_isUndefined (v))
+ return cstring_undefined;
+
+ llassert (uentry_isFunction(v));
+
+ st = uentry_getName(v);
+ tmp = ctype_unparseFunction (v->utype, st);
+ if ( qualList_isDefined(v->cQuals) )
+ {
+ cQuals = qualList_unparse(v->cQuals);
+ }
+ else
+ {
+ cQuals = cstring_undefined;
+ }
+
+ if (uentry_isStatic(v) )
+ {
+ storageSp = cstring_makeLiteral("static");
+ }
+ else if (uentry_isExtern(v) )
+ {
+ storageSp = cstring_makeLiteral("extern");
+ }
+ else if (uentry_isExtern(v) )
+ {
+ storageSp = cstring_makeLiteral("");
+ }
+ else
+ {
+
+ // // drl make sure this is a legal/legit case
+
+ storageSp = cstring_makeLiteral("");
+ }
+
+ ret = message("%q %q %q",storageSp, cQuals, tmp);
+ return ret;
+ // ctbase_unparseFunction (ctype_getCtbaseSafe (v->utype), st);
+
+}
+
/*@only@*/ cstring
uentry_unparse (uentry v)
{
enew->storageclass = e->storageclass;
enew->info = uinfo_copy (e->info, e->ukind);
+ enew->cQuals = qualList_copy(e->cQuals);
+
+
return enew;
}
llassert (uentry_isValid (old));
llassert (uentry_isValid (unew));
- if ((uentry_isEitherConstant (unew) || uentry_isDatatype (unew))
+ if (uentry_isEitherConstant (unew)
&& (fileloc_isPreproc (uentry_whereDeclared (old))
|| ctype_isUnknown (old->utype))
&& !uentry_isSpecified (old))
if (optgenerror
(FLG_MATCHFIELDS,
message ("Enum %q declared with members { %q } but "
- "%s with members { %q }",
+ "specified with members { %q }",
uentry_getName (old),
enumNameList_unparse (enew),
- uentry_specOrDefName (old),
enumNameList_unparse (eold)),
uentry_whereDeclared (unew)))
{
}
}
+/*drl added 4/02/2002*/
+static void
+uentry_printDecl (void)
+{
+
+ if (context_getFlag(FLG_GENERATECODE) )
+ {
+ cstring st;
+ if (fileloc_isDotH(g_currentloc) )
+ {
+ return;
+ }
+ st = message ("%s", uentry_unparse(posRedeclared));
+ outputCode(message( "%s", st));
+
+ }
+}
+
/*
** Can't generate function redeclaration errors when the
** entries are merged, since we don't yet know if its the
enew->info = uinfo_copy (e->info, e->ukind);
enew->warn = warnClause_copy (e->warn);
+ enew->cQuals = qualList_copy(e->cQuals);
+
DPRINTF (("Here we are..."));
DPRINTF (("original: %s", uentry_unparseFull (e)));
DPRINTF (("copy: %s", uentry_unparse (enew)));