c-common.c (handle_alias_attribute): Reject the attribute if current_function_decl is set.

* c-common.c (handle_alias_attribute): Reject the attribute if
        current_function_decl is set.

From-SVN: r78472
This commit is contained in:
Richard Henderson 2004-02-25 17:24:37 -08:00 committed by Richard Henderson
parent 6ce7631670
commit f6a76b9f5d
2 changed files with 12 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2004-02-25 Richard Henderson <rth@redhat.com>
* c-common.c (handle_alias_attribute): Reject the attribute if
current_function_decl is set.
2004-02-25 Kelley Cook <kcook@gcc.gnu.org>
* config.gcc: Add comment describing extra_gcc_objs.

View File

@ -4827,7 +4827,13 @@ handle_alias_attribute (tree *node, tree name, tree args,
error ("%J'%D' defined both normally and as an alias", decl, decl);
*no_add_attrs = true;
}
else if (decl_function_context (decl) == 0)
/* Note that the very first time we process a nested declaration,
decl_function_context will not be set. Indeed, *would* never
be set except for the DECL_INITIAL/DECL_EXTERNAL frobbery that
we do below. After such frobbery, pushdecl would set the context.
In any case, this is never what we want. */
else if (decl_function_context (decl) == 0 && current_function_decl == NULL)
{
tree id;