This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Unnamed unions
- To: "Timothy J. Wood" <tjw at omnigroup dot com>
- Subject: Re: Unnamed unions
- From: Doug Landauer <landauer at apple dot com>
- Date: Fri, 16 Feb 2001 15:55:53 -0800
- Cc: gcc at gcc dot gnu dot org
> I end up porting a lot of code that is built with VC++ and/or
> Metrowerks to Mac OS X using gcc. Apparently both of these compilers
> support the following:
My tests show gcc supporting anonymous unions as well.
Are you maybe thinking of anonymous structs?
> struct {
> union {
> int a, b;
> };
> } x;
>
> int main()
> {
> x.a = 1;
> return 0;
> }