long long bit-fields

Segher Boessenkool segher@koffie.nl
Tue Apr 1 00:11:00 GMT 2003


Falk Hueffner wrote:
> How about:
> 
>     struct { unsigned long long ull31a: 33; } x = { -1 };
>     printf("%016llx\n", (x.ull31a << 48) >> 48);
> 
> We don't currently promote to signed long long if it fits. Should we?

Yes.  But IMHO, of course.


Segher



More information about the Gcc mailing list