stor-layout.c (place_union_field): Apply ADJUST_FIELD_ALIGN to unions.
authorDavid Edelsohn <edelsohn@gnu.org>
Sat, 8 Dec 2001 19:43:07 +0000 (19:43 +0000)
committerDavid Edelsohn <dje@gcc.gnu.org>
Sat, 8 Dec 2001 19:43:07 +0000 (14:43 -0500)
        * stor-layout.c (place_union_field): Apply ADJUST_FIELD_ALIGN
        to unions.

From-SVN: r47796

gcc/ChangeLog
gcc/stor-layout.c

index d66fb52f7ef825d1ca3585dac2ccc70728606fe0..799f445cfc682f2555ab2cb2141a9270f11583a2 100644 (file)
@@ -1,3 +1,8 @@
+2001-12-08  David Edelsohn  <edelsohn@gnu.org>
+
+       * stor-layout.c (place_union_field): Apply ADJUST_FIELD_ALIGN
+       to unions.
+
 2001-12-08  Neil Booth  <neil@daikokuya.demon.co.uk>
 
        * c-parse.in: Take string literals in assembler constructs,
index a3d122f050042168c987402695db4f32c7d60dda..05eaf247f39f36a0e471635830d4dcd04cbd098e 100644 (file)
@@ -658,6 +658,10 @@ place_union_field (rli, field)
       MIN (desired_align, (unsigned) BIGGEST_FIELD_ALIGNMENT);
 #endif
 
+#ifdef ADJUST_FIELD_ALIGN
+  desired_align = ADJUST_FIELD_ALIGN (field, desired_align);
+#endif
+
   TYPE_USER_ALIGN (rli->t) |= DECL_USER_ALIGN (field);
 
   /* Union must be at least as aligned as any field requires.  */