------- Comment #4 from pinskia at gcc dot gnu dot org 2009-04-11 07:20 ------- u_int32_t mask[1] = { 0xffffffff }; u_int32_t cfg[1] = { 0x11111111 };
u_int16_t *cfg16 = (u_int16_t *)cfg; u_int16_t *mask16 = (u_int16_t *)mask; printf("mask16[0]: 0x%04x\n", mask16[0]); You are violating C/C++ aliasing rules as you are accessing a u_int32_t as a u_int16_t. *** This bug has been marked as a duplicate of 21920 *** -- pinskia at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |DUPLICATE http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39734