diff options
| author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-02-26 01:24:37 +0000 |
|---|---|---|
| committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-02-26 01:24:37 +0000 |
| commit | 8c42f0d98372bcae4ece36bf43bf823a8ba5fcc9 (patch) | |
| tree | 259232151172287ef6bbde3e486554b4b92b2a0c | |
| parent | 62ccbd127169ea562ffcb0b792c6938cf97aa52b (diff) | |
| download | ppe42-gcc-8c42f0d98372bcae4ece36bf43bf823a8ba5fcc9.tar.gz ppe42-gcc-8c42f0d98372bcae4ece36bf43bf823a8ba5fcc9.zip | |
* c-common.c (handle_alias_attribute): Reject the attribute if
current_function_decl is set.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@78472 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | gcc/ChangeLog | 5 | ||||
| -rw-r--r-- | gcc/c-common.c | 8 |
2 files changed, 12 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 284ef088d47..80a9c564d0c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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. diff --git a/gcc/c-common.c b/gcc/c-common.c index 3d9dbfa3297..4c0ce271077 100644 --- a/gcc/c-common.c +++ b/gcc/c-common.c @@ -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; |

