]> gcc.gnu.org Git - gcc.git/commitdiff
attribs.c (decl_attributes): Clear ATTR_FLAG_TYPE_IN_PLACE if type_required and passe...
authorRichard Kenner <kenner@vlsi1.ultra.nyu.edu>
Thu, 17 Jan 2002 20:34:40 +0000 (20:34 +0000)
committerRichard Kenner <kenner@gcc.gnu.org>
Thu, 17 Jan 2002 20:34:40 +0000 (15:34 -0500)
* attribs.c (decl_attributes): Clear ATTR_FLAG_TYPE_IN_PLACE
if type_required and passed decl.

From-SVN: r48964

gcc/ChangeLog
gcc/attribs.c

index 38dc3090b544e295b843aedf4f837db151c4a4f4..9b5241971eddc11b809a367a24f4686da6e4b0bd 100644 (file)
@@ -1,3 +1,8 @@
+Thu Jan 17 15:28:26 2002  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
+
+       * attribs.c (decl_attributes): Clear ATTR_FLAG_TYPE_IN_PLACE
+       if type_required and passed decl.
+
 2002-01-17  Aldy Hernandez  <aldyh@redhat.com>
 
         * config.gcc (cpu_type): Include altivec.h in powerpc
index 2f2096d1010ce081e5be3c3a0f195712eabe2060..7cb11724f8326275e25facae75c62b1e189a6add 100644 (file)
@@ -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)
This page took 0.070859 seconds and 5 git commands to generate.