This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: MS-style bit-field placement
- To: Mumit Khan <khan at NanoTech dot Wisc dot EDU>
- Subject: Re: MS-style bit-field placement
- From: Alexandre Oliva <aoliva at redhat dot com>
- Date: 15 Apr 2001 13:59:44 -0300
- Cc: gcc-patches at gcc dot gnu dot org
- Organization: GCC Team, Red Hat
- References: <Pine.HPP.3.96.1010414142126.29418B-100000@hp2.xraylith.wisc.edu>
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