GCC Issue with unnammed nested struct in c

naveen yadav yad.naveen@gmail.com
Wed Jun 26 12:57:00 GMT 2013


Dear All,

struct xx
{
        int x;
        struct yy *p;
        struct
        {
                int  s;
        };
        struct
        {
                int  s;
        };

};

int main()
{

        struct xx xyz;
        printf("%d",sizeof(xyz));
        return 0;
}

the above code compile well without any warning. Here my question is
1. How can I distinguish  two 's' variable.
2. What is use case.



More information about the Gcc-help mailing list