This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: MS-style bit-field placement


On Apr 14, 2001, Mumit Khan <khan@NanoTech.Wisc.EDU> wrote:

>> On Apr 14, 2001, Alexandre Oliva <aoliva@redhat.com> wrote:

>> > Here's a patch that makes GCC capable of placing bit-fields exactly
>> > like Microsoft compilers do.  Or so it seems to me.

> Have you taken a look at Donn Terry's old patch (Cygwin and Mingw have
> been using this for a long time now)?

Ha!  So *that's* why I had the impression GCC was already capable of
producing MSVC-style bit fields, and was surprised to find out it
didn't, and ended up implementing it.

>    URL: http://gcc.gnu.org/ml/gcc-patches/1999-06n/msg00702.html

> You may want to take a look at the testcase that Donn provides.

Thanks.  His patch is probably something that should eventually be
integrated in GCC.  At least the ability to change bit-field placement
modes with attributes looks like a good idea to me.  The only thing I
dislike in that patch is calling the MSVC style ``native''.  I
understand it's the native format for MS OSs, but that's it.  What if
we called the PCC bit-field placement ``native'', just because it
happens to be the native format of OSs that used PCC as the default
compiler? :-)

Thanks for the pointer to the testcases!  They look familiar to me,
but testing this stuff is never too much :-)

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]