You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It gives this error:
test.c(27): Error! E1063: Missing operand
This error doesn't depend on the presence of the trailing comma. Using -za99 doesn't change anything either. However, the error goes away when removing one of the bit field initializers (either bit1 or bit2). The error also goes away when using array-style initialization:
static const some_struct S={1,2,0,1};
I had a watch in the ISO/IEC 9899:1999 reference, section 6.7.8 , to make sure there wasn't some restriction on bit fields initialization, but didn't see anything special about them. Moreover, everything compiles fine with gcc.
The text was updated successfully, but these errors were encountered:
Hello,
I found an issue when initializing multiple bit fields:
It gives this error:
test.c(27): Error! E1063: Missing operand
This error doesn't depend on the presence of the trailing comma. Using -za99 doesn't change anything either. However, the error goes away when removing one of the bit field initializers (either bit1 or bit2). The error also goes away when using array-style initialization:
I had a watch in the ISO/IEC 9899:1999 reference, section 6.7.8 , to make sure there wasn't some restriction on bit fields initialization, but didn't see anything special about them. Moreover, everything compiles fine with gcc.
The text was updated successfully, but these errors were encountered: