------- Comment #3 from kkojima at gcc dot gnu dot org  2006-06-08 01:50 -------
It seems that r114364 adds the extra alignment for non bit-field
fields always for the ms_bitfield_layout_p case.  It looks the packed
attribute should be taken into account, though I'm unsure whether
it's the way of ms_bitfield or not.  How does this look?

--- ORIG/trunk/gcc/stor-layout.c        2006-06-06 10:02:03.000000000 +0900
+++ LOCAL/trunk/gcc/stor-layout.c       2006-06-07 23:16:01.000000000 +0900
@@ -693,7 +693,7 @@ update_alignment_for_field (record_layou
         the type, except that for zero-size bitfields this only
         applies if there was an immediately prior, nonzero-size
         bitfield.  (That's the way it is, experimentally.) */
-      if (!is_bitfield
+      if ((!is_bitfield && !DECL_PACKED (field))
          || (!integer_zerop (DECL_SIZE (field))
              ? !DECL_PACKED (field)
              : (rli->prev_field


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27942

Reply via email to