Union element alignment query

Bo Curry curry at hplred.HP.COM
Fri Nov 16 11:47:57 AEST 1990


A simple question for the wizards:

Assume I define

union {
   FOOTYPE	a[4];
   BARTYPE        b;
} combo;

Does the standard guarantee that (void *)(&combo.a[0]) == (void *)(&combo.b) ?

Thanks,

Bo Curry
curry at hplabs.hpl.hp.com



More information about the Comp.lang.c mailing list