This is the mail archive of the gcc-help@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]

A bit field's length


On a 32 bit platform,
Is this structure legal?

struct
{
UINT64 part1 : 48;
UINT64 part2 : 16;
}Parts;

Do I have to tune the compiler to pack them into a single 64 bit
space? While assigning some 32 bit value to Parts.part1, do I have to
cast the r-value into UINT64?

Sorry if this were a repetition.
Thanks,
kumaresh


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