This is the mail archive of the gcc@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: for the future: Plan 9's anonymous structs


In article <199901130238.SAA01783@kankakee.wrs.com>,
mrs@wrs.com  (Mike Stump) writes:
>> Date: Tue, 12 Jan 1999 02:17:10 -0500
>> From: Zack Weinberg <zack@rabi.columbia.edu>

>> Plan 9's C compiler has an extension which is very useful: anonymous struct
>> members.

>> I suppose I can attempt to do this myself, but I know nothing about the C
>> front end, so where would I start and how hard would it be?

> Part of the benefit of GNU C, is that it has a nice predictible
> (usually) relationship with GNU C++.  This is achived in part because
> features are added to both C and C++ at the same time.  C++ I think
> may complicate the above extension, and one should examine C++ and
> it's required semantics before doing this for C so as to not diverge
> them more than necessary.

In C++ there is no extension, because anonymous unions are part of the C++
Standard and already work fine with g++

BTW, VC++ supports anonymous unions too, even in C mode. Apparently some 
windows system includes use this extension.

-Andi


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