Richard Kenner writes: > Otherwise, if you have > > struct foo {int a: 32; int b: 32; }; > struct bar {int c: 32; int d: 32; }; > > you have the fields A and C conflicting, which is wrong.
Well, that is where structure-field aliasing comes in. The two cannot even alias for addressable fields: struct s { int a; int b; }; struct t { int a; int b; }; struct s *a; struct t *b; main () { a->a = 1; b->a = 2; return a->a; } movq a(%rip), %rax movl $1, (%rax) movq b(%rip), %rax movl $2, (%rax) movl $1, %eax ret Adam