underlying type for enums

Joseph S. Myers jsm@polyomino.org.uk
Wed Dec 3 02:03:00 GMT 2003


On Tue, 2 Dec 2003, Zack Weinberg wrote:

> It is not clear to me what to do with long int bitfields.  I think
> they get converted to long int.  6.2.1.5 does not state whether an
> operand with type long int bitfield is regarded as having type long

Of course, since C90 ignores the possibility of long int bit-fields.

> int.  If it isn't, then they might get truncated to int under some
> conditions, which would be silly, so I'm betting they aren't; but then

DR#015 explains the promotion for bit-fields in C90; I think this must
apply to long int bit-fields as well as int and unsigned int ones.  I
don't think any differences between C90 and C99 modes are ever needed
here.

-- 
Joseph S. Myers
jsm@polyomino.org.uk



More information about the Gcc mailing list