Hi!
What is the difference between the below 3 cases in ANSI C?
I know what a volatile and what a bitfield is, so it is not necessary to explain those.
Furthermore, I think that struct1, struct2 and struct3 are exactly the same, but I'm not sure and that's why I'm asking!
Thanks in advance!
What is the difference between the below 3 cases in ANSI C?
Code:
typedef struct
{
[B]volatile [/B]unsigned char a : 1,
b : 1,
c : 1,
d : 1,
e : 1,
f : 1,
g : 1,
h : 1;
} MyStruct1;
MyStruct1 struct1;
typedef struct
{
unsigned char a : 1,
b : 1,
c : 1,
d : 1,
e : 1,
f : 1,
g : 1,
h : 1;
} MyStruct2;
[B]volatile [/B]MyStruct2 struct2;
typedef struct
{
[B]volatile [/B]unsigned char a : 1,
b : 1,
c : 1,
d : 1,
e : 1,
f : 1,
g : 1,
h : 1;
} MyStruct3;
[B]volatile [/B]MyStruct3 struct3;
I know what a volatile and what a bitfield is, so it is not necessary to explain those.
Furthermore, I think that struct1, struct2 and struct3 are exactly the same, but I'm not sure and that's why I'm asking!
Thanks in advance!
Comment