This is the mail archive of the gcc@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]
Other format: [Raw text]

Unnamed Struct / Union


Hi All ,

GCC 4.8.3 ,pop up with below error

/home/i16382/an.c:13:18: error: duplicate member 'bOriginator'
         unsigned bOriginator;
                  ^

for the case

union
{
    struct
    {
        unsigned bStatusType;
        unsigned bOriginator;
    };
    struct
    {
        unsigned originator;
        unsigned memoryContentsChanged;
        unsigned interruptPending;
        unsigned bOriginator;
    };
} USB_WORD;

is that expected behaviour ?

Thank you
~Umesh


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