From: Richard Stallman Date: Tue, 30 Jun 1992 02:25:17 +0000 (+0000) Subject: (decl_attributes): For `packed' on VAR_DECL, set DECL_PACKED and DECL_ALIGN. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f3ee8ad13396dad3d2cbded7a3d7db44f5c75d22;p=gcc.git (decl_attributes): For `packed' on VAR_DECL, set DECL_PACKED and DECL_ALIGN. From-SVN: r1354 --- diff --git a/gcc/c-common.c b/gcc/c-common.c index 8dc92d86f80..82558ffdacc 100644 --- a/gcc/c-common.c +++ b/gcc/c-common.c @@ -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