J
jlara
Having been stung by the same problem twice, I would like to
automatically check if the bitfields are regarded properly by the
compiler. For example, if I define the following structure:
typedef struct
{
unsigned int : 4;
unsigned int tffca : 1;
unsigned int tsfrz : 1;
unsigned int tswai : 1;
unsigned int ten : 1;
}tTSCR1;
Is there a way to check if the compiler considers bitfield ten to be
the most significant bit?
If there is, I would like to have the compiler give an error message (
#error ) and abort.
Thanks very much in advance.
automatically check if the bitfields are regarded properly by the
compiler. For example, if I define the following structure:
typedef struct
{
unsigned int : 4;
unsigned int tffca : 1;
unsigned int tsfrz : 1;
unsigned int tswai : 1;
unsigned int ten : 1;
}tTSCR1;
Is there a way to check if the compiler considers bitfield ten to be
the most significant bit?
If there is, I would like to have the compiler give an error message (
#error ) and abort.
Thanks very much in advance.