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: long long bit-fields


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



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