Anonymous struct/union in C

Richard Henderson rth@cygnus.com
Tue Jun 15 22:34:00 GMT 1999


On Tue, Jun 15, 1999 at 09:35:42PM -0500, Mumit Khan wrote:
> It adds the support for the following:
> 
>   #include <stdio.h>
> 
>   struct {
>     struct {
>       int b1;
>       int b2;
>     };
>     union {
>       float f1;
>       int i1;
>     };
>     int b3;
>   } foo = {{31, 17}, {3.2}, 13};

This one I understand -- I've actually wanted it for some time.

>   struct person
>   {
>     char name[30];
>     struct phone;
>   } Jim = {"Jim bob", {53706, 123456}};

This is just too gross to live.  Please tell me it isn't part
of some windows compatibility thing.


r~


More information about the Gcc-patches mailing list