hi,
let's look at code below
typedef union
{
unsigned int n32bits;
struct
{
char p1 : 1;
char p2 : 1;
char p3 : 1;
unsigned int p4 : 29;
}s;
}u;
u u1;
u1.s.p1 = 0;
u1.s.p2 = 1;
u1.s.p3 = 1;
u1.s.p4 = 1;
what value should have u1.n32bits ??
u1.n32bits =
gcc 0x0000000E // ok,
vc 0x00000106 // error, p4 is inplaced!!
Does someone know what is going on here?
--
Marcin Gabryszewski
G DATA Software
www.gdata.pl
address:<FirstName><dot><Surname><at><gdata><dot><pl>