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


On Jan 20, 2000, lacix@arh.tki.hu wrote:

> I don't know how to use anonymous structures or why not work my
> compiler..

There's no such thing as an anonymous structure in the C++ Standard.
There are anonymous unions, that are conceptually similar, but that
don't accomplish what you want.  AFAIK, some proprietary compiler has
introduced anonymous structs as a ``feature'', and I heard GCC is
going to support such a construct in the next major release, but it
will emit a warning unless the flag -fms-extensions is given.
Besides, it will only accept such anonymous structs when nested within
another class, not as local variables within a function.

-- 
Alexandre Oliva http://www.ic.unicamp.br/~oliva IC-Unicamp, Bra[sz]il
oliva@{lsd.ic.unicamp.br,guarana.{org,com}} aoliva@{acm,computer}.org
oliva@{gnu.org,kaffe.org,{egcs,sourceware}.cygnus.com,samba.org}
** I may forward mail about projects to mailing lists; please use them


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