This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/27948] New: MS -bitfield struct layout test fails
- From: "dannysmith at users dot sourceforge dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Jun 2006 07:32:00 -0000
- Subject: [Bug c/27948] New: MS -bitfield struct layout test fails
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Since this revision:
2006-06-04 Eric Christopher <echristo@apple.com>
* stor-layout.c (start_record_layout): Initialize
remaining_in_alignment.
(debug_rli): Output value for remaining_in_alignment.
(update_alignment_for_field): Unconditionalize
ms_bitfield_layout_p code. Handle non-bitfield fields. Remove
extra alignment code.
(place_field): Don't realign if ms_bitfield_layout_p. Unconditionalize
ms_bitfield_layout_p code. Rewrite handling of structure fields.
* tree.h (record_layout_info_s): Remove prev_packed.
* doc/extend.texi (ms_struct): Add documentation of format.
The ms-bitfield test gcc.dg/bf-ms-layout.c fails.
In particular, the 0-size bitfield in
struct six {
char a :8;
int :0; /* not ignored; prior field IS a bitfield, causes
struct alignment as well. */
char b;
char c;
} ;
is being ignored
I have reconfirmed that that the test does indeed pass with MS VC6 compiler.
Danny
--
Summary: MS -bitfield struct layout test fails
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: dannysmith at users dot sourceforge dot net
GCC build triplet: i686-pc-mingw32
GCC host triplet: i686-pc-mingw32
GCC target triplet: i686-pc-mingw32
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27948