]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
c-common.c (decl_attributes): Differentiate between types and type decls for alignment.
authorCatherine Moore <clm@cygnus.com>
Fri, 30 Jun 2000 14:59:10 +0000 (14:59 +0000)
committerCatherine Moore <clm@gcc.gnu.org>
Fri, 30 Jun 2000 14:59:10 +0000 (10:59 -0400)
        * c-common.c (decl_attributes):  Differentiate between
        types and type decls for alignment.

From-SVN: r34810

gcc/ChangeLog
gcc/c-common.c

index 3ee3b4091ae9d92cc9701c577a7c637e853000be..4901bafafbc5ba68645b0e5e3e0af526820d7cf5 100644 (file)
@@ -1,3 +1,8 @@
+2000-06-30  Catherine Moore  <clm@cygnus.com>
+        * c-common.c (decl_attributes):  Differentiate between
+        types and type decls for alignment.
+
 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
 
        * cpp.texi: Document #pragma GCC dependency
index 5fffa79f41b7b854275775b42eba8608d9d8646a..dafa33e5fca3ca7ccfbcd84d6f9000bc38a93913 100644 (file)
@@ -779,8 +779,16 @@ decl_attributes (node, attributes, prefix_attributes)
              error ("requested alignment is too large");
            else if (is_type)
              {
-               TYPE_ALIGN (type) = (1 << i) * BITS_PER_UNIT;
-               TYPE_USER_ALIGN (type) = 1;
+               if (decl)
+                 {
+                   DECL_ALIGN (decl) = (1 << i) * BITS_PER_UNIT;
+                   DECL_USER_ALIGN (decl) = 1;
+                 }
+               else
+                 {
+                   TYPE_ALIGN (type) = (1 << i) * BITS_PER_UNIT;
+                   TYPE_USER_ALIGN (type) = 1;
+                 }
              }
            else if (TREE_CODE (decl) != VAR_DECL
                     && TREE_CODE (decl) != FIELD_DECL)