https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115570
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |INVALID Status|UNCONFIRMED |RESOLVED --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- The warning is correct. sizeof(long) on x86_64 is 8 rather than 4 that it was on i686. So when you do this: unsigned char cValue[4]; unsigned long *value = 0; value = (unsigned long *)cValue; *value & 0xffffffff You get undefined behavior because you are reading 8 bytes from a 4 byte array.