typeof and bitfields

Andrew Haley aph@redhat.com
Fri Jan 14 20:25:00 GMT 2005


Andrew Haley writes:
 > Dave Korn writes:
 >  > 
 >  >   While we're on the subject, I've always been curious what on earth the meaning
 >  > of 
 >  > 
 >  > struct foo {
 >  >    int   bar : 1;
 >  > };
 >  > 
 >  > could possibly mean.  What are the range of values in a 1-bit
 >  > signed int?  Is that 1 bit the sign bit or the value field?  Can
 >  > bar hold the values 0 and 1, or 0 and -1, or some other set?  (+1
 >  > and -1,
 > 
 > That one.

Sorry, typo.  -1 and 0.

Andrew.



More information about the Gcc mailing list