+void
+context_enterOldStyleScope (void)
+{
+ gc.kind = CX_OLDSTYLESCOPE;
+ DPRINTF (("Enter old style scope!"));
+ usymtab_enterFunctionScope (uentry_undefined);
+}
+
+void
+context_completeOldStyleFunction (uentry e)
+{
+ llassert (gc.kind == CX_OLDSTYLESCOPE);
+
+ gc.kind = CX_FUNCTION;
+ gc.cont.fcn = e;
+
+ DPRINTF (("Enter function: %s", uentry_unparse (e)));
+
+ if (uentry_hasAccessType (e))
+ {
+ gc.acct = typeIdSet_subtract (typeIdSet_union (gc.facct, uentry_accessType (e)),
+ gc.nacct);
+ }
+ else
+ {
+ gc.acct = gc.facct;
+ }
+
+ DPRINTF (("Enter function: %s / %s", uentry_unparse (e),
+ typeIdSet_unparse (gc.acct)));
+
+ gc.showfunction = context_getFlag (FLG_SHOWFUNC);
+
+ if (!globSet_isEmpty (uentry_getGlobs (e)))
+ {
+ llfatalerror (message ("%q: Old-style function declaration uses a clause (rewrite with function parameters): %q",
+ fileloc_unparse (g_currentloc), uentry_unparse (e)));
+ }
+
+ gc.showfunction = context_getFlag (FLG_SHOWFUNC);
+
+ gc.globs = uentry_getGlobs (e);
+ globSet_clear (gc.globs_used);
+
+ gc.mods = uentry_getMods (e);
+
+ if (!sRefSet_isEmpty (gc.mods))
+ {
+ llfatalerror (message ("%q: Old-style function declaration uses a clause (rewrite with function parameters): %q",
+ fileloc_unparse (g_currentloc), uentry_unparse (e)));
+ }
+
+ sRef_enterFunctionScope ();
+}
+