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]

Re: underlying type for enums


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


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