This is the mail archive of the gcc-bugs@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: Anonymous structures


Michael Vance <briareos@lokigames.com> writes:
> Hello,
> 
> I can't tell if anonymous structures have been incorporated into
> mainline gcc-2.9.5.1. The nasty little snippet I'm trying to compile
> is:

The anon-aggregates are in the "mainline", and not in gcc-2.95 release
branch.

If you really want to play with it, I've extracted the required patches
against gcc-2.95, which is part of the windows binaries I distribute.
ftp://ftp.xraylith.wisc.edu/pub/khan/gnu-win32/cygwin/gcc-2.95/patches/
contains the patchset. There are quite a few other patches in the set, 
but for this, you'd need the following (at the very least):

gcc-2.95-c++-tidy.diff ................ Jason's C++ "tidying" patch.
                                        Prereq for all other C++ patches.
gcc-2.95-c++-anon-struct.diff   ....... Anonymous structs in C++.
gcc-2.95-c++-anon-struct2.diff  .......   small tweak.

I *believe* that these are all you need to support anon-aggregates in C, 
but I've been wrong before. 

The patchset also contains patch for anon-aggregates in C (submitted but
yet to be evaluated by the maintainers):

gcc-2.95-anon-struct-union.diff ....... Anonymous structs/unions in C.

This one is slightly modified version of Alastair Houghton's work.

All at your own risk of course. 

Regards,
Mumit


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