This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: underlying type for enums
"Joseph S. Myers" <jsm@polyomino.org.uk> writes:
> 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.
Duh, I had just read 6.5.2.1 and I forgot that it only allowed
(signed/unsigned) int bitfields.
> 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'm not sure what that would mean - but do we really care? Since C90
does not admit to long int bitfields, we're in extension territory
supporting them in C90 mode, which means we can do as we like - that's
plenty of justification for handling them according to C99's rules.
zw