This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: anonymous structures
- To: lacix at arh dot tki dot hu
- Subject: Re: anonymous structures
- From: Alexandre Oliva <oliva at lsd dot ic dot unicamp dot br>
- Date: 20 Jan 2000 22:15:58 -0200
- Cc: bug-gcc at gnu dot org
- References: <38875893.353E0AD7@arh.tki.hu>
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