On Mon, 27 Feb 2012, Kai Tietz wrote: > For gcc_struct variant bitfields with different types get merged > together, but for ms_struct bitfields are getting merged together > only, if they have same type. As in those structures - I modified in > this patch - we have varying types for bitfields, this struct-layout > attribute is required.
I think you need a comment in soft-fp.h explaining the issue (and in particular that it is about structures with consecutive (?) bit-fields with different declared types). Though I presume the attribute is harmless on other structures - so it might make sense to put it in single.h and double.h as well to make it clear that those structures too are expected to follow the same layout rules as those in extended.h and quad.h. > 2012-02-28 Kai Tietz <kti...@redhat.com> > > * config/i386/sfp-machine.h (_FP_STRUCT_LAYOUT): Define it > for mingw-targets as attribute gcc_struct. > * soft-fp/soft-fp.h (_FP_STRUCT_LAYOUT): If not defined, > define it as empty macro. > * soft-fp/quad.h: Mark bitfield-structures by _FP_STRUCT_LAYOUT. > * soft-fp/extended.h: Mark bitfield-structures by _FP_STRUCT_LAYOUT. Please send patches to libc-alpha that apply cleanly to current git glibc. That means only patching files present in glibc (not GCC's sfp-machine.h) and having ChangeLog entries only for the files in glibc. > Index: soft-fp/soft-fp.h > =================================================================== > --- soft-fp/soft-fp.h (revision 184486) > +++ soft-fp/soft-fp.h (working copy) > @@ -210,4 +210,8 @@ > extern void abort (void); > #endif > > +#ifndef _FP_STRUCT_LAYOUT > +#define _FP_STRUCT_LAYOUT > #endif I think this belongs at the bottom of the sequence of #ifndef default definitions of various macros, not at the bottom of the whole file, and is where the comment should go explaining why there is such a macro. -- Joseph S. Myers jos...@codesourcery.com