[cfe-dev] Microsoft ABI Support vs. ms_struct & Removing -mms-bitfields

Anton Korobeynikov anton at korobeynikov.info
Sat Aug 31 14:06:59 PDT 2013


As far as I remember, gcc 4.7 defaults to -mms-bitfields, prior
versions - to -mno-ms-bitfields. So, it might be useful feature for
ABI compatibility (yes, this was pretty weird solution from gcc side,
as it seems to me)...

On Sun, Sep 1, 2013 at 12:13 AM, Chandler Carruth <chandlerc at google.com> wrote:
> We don't have to support every GCC feature. Only ones that people actually
> rely on and impede compatibility. The question is whether this is such a
> feature. To understand this, we need to understand use cases.
>
> On Aug 31, 2013 12:43 PM, "Anton Korobeynikov" <anton at korobeynikov.info>
> wrote:
>>
>> Both actually. Given that -mms-bitfields is a valid gcc option we also
>> need to support it.
>>
>> On Sat, Aug 31, 2013 at 11:26 PM, Reid Kleckner <rnk at google.com> wrote:
>> > Do you mean command line or ABI compatibility?  Whatever mingw does for
>> > bitfield layout, we should match it when the triple says mingw. Users
>> > shouldn't have to add -mms-bitfields.  I'd have to double check its
>> > layout.
>> >
>> >
>> > On Sat, Aug 31, 2013 at 11:05 AM, Anton Korobeynikov
>> > <anton at korobeynikov.info> wrote:
>> >>
>> >> > Can we get rid of mms-bitfields in favor of ms_struct?  Is anyone
>> >> > using
>> >> > mms-bitfields?  Because mms-bitfields is global, it applies to the
>> >> > entire
>> >> > #include chain for a TU and can cause system structs etc to be laid
>> >> > out
>> >> > incorrectly and potentially silently break standard library
>> >> > interfaces/linking to TUs that don't have mms-bitfields, etc.
>> >> Will this break compatibility with mingw? If yes, then mms-bitfields
>> >> should stay.
>> >>
>> >> --
>> >> With best regards, Anton Korobeynikov
>> >> Faculty of Mathematics and Mechanics, Saint Petersburg State University
>> >>
>> >> _______________________________________________
>> >> cfe-dev mailing list
>> >> cfe-dev at cs.uiuc.edu
>> >> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>> >
>> >
>>
>>
>>
>> --
>> With best regards, Anton Korobeynikov
>> Faculty of Mathematics and Mechanics, Saint Petersburg State University
>> _______________________________________________
>> cfe-dev mailing list
>> cfe-dev at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev



-- 
With best regards, Anton Korobeynikov
Faculty of Mathematics and Mechanics, Saint Petersburg State University



More information about the cfe-dev mailing list