(decl_attributes): For `packed' on VAR_DECL, set DECL_PACKED and DECL_ALIGN.
authorRichard Stallman <rms@gnu.org>
Tue, 30 Jun 1992 02:25:17 +0000 (02:25 +0000)
committerRichard Stallman <rms@gnu.org>
Tue, 30 Jun 1992 02:25:17 +0000 (02:25 +0000)
From-SVN: r1354

gcc/c-common.c

index 8dc92d86f8036e74c9a643ea2e17dd33f5d045ff..82558ffdaccbf9dbb7d6dbb3c422defa8510b511 100644 (file)
@@ -198,10 +198,15 @@ decl_attributes (decl, attributes)
       {
        if (TREE_CODE (decl) == FIELD_DECL)
          DECL_PACKED (decl) = 1;
+       else if (TREE_CODE (decl) == VAR_DECL)
+         {
+           DECL_PACKED (decl) = 1;
+           DECL_ALIGN (decl) = BITS_PER_UNION;
+         }
       }
     else if (TREE_VALUE (a) != 0
-       && TREE_CODE (TREE_VALUE (a)) == TREE_LIST
-       && TREE_PURPOSE (TREE_VALUE (a)) == get_identifier ("mode"))
+            && TREE_CODE (TREE_VALUE (a)) == TREE_LIST
+            && TREE_PURPOSE (TREE_VALUE (a)) == get_identifier ("mode"))
       {
        int i;
        char *specified_name