summaryrefslogtreecommitdiff
path: root/gcc/attribs.c
diff options
context:
space:
mode:
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>2002-01-17 20:34:40 +0000
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>2002-01-17 20:34:40 +0000
commitaa9c60c12fb85adcecd92c469ef1b242dd5eab43 (patch)
tree3ea62dd698751e51407731d82ae73ecc7a4e1fcd /gcc/attribs.c
parent25b7153e0486cb2df595b3651706610c9fd4ff30 (diff)
downloadgcc-aa9c60c12fb85adcecd92c469ef1b242dd5eab43.tar.gz
* attribs.c (decl_attributes): Clear ATTR_FLAG_TYPE_IN_PLACE
if type_required and passed decl. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@48964 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/attribs.c')
-rw-r--r--gcc/attribs.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/attribs.c b/gcc/attribs.c
index 2f2096d1010..7cb11724f83 100644
--- a/gcc/attribs.c
+++ b/gcc/attribs.c
@@ -338,8 +338,15 @@ decl_attributes (node, attributes, flags)
}
}
+ /* If we require a type, but were passed a decl, set up to make a
+ new type and update the one in the decl. ATTR_FLAG_TYPE_IN_PLACE
+ would have applied if we'd been passed a type, but we cannot modify
+ the decl's type in place here. */
if (spec->type_required && DECL_P (*anode))
- anode = &TREE_TYPE (*anode);
+ {
+ anode = &TREE_TYPE (*anode);
+ flags &= ~(int) ATTR_FLAG_TYPE_IN_PLACE;
+ }
if (spec->function_type_required && TREE_CODE (*anode) != FUNCTION_TYPE
&& TREE_CODE (*anode) != METHOD_TYPE)