--- a/endian.c +++ b/endian.c @@ -9,6 +9,7 @@ int endian () { unsigned short word = 0x1234; + unsigned char *p = (unsigned char *)&word; return ((p[0] == 0x34) ? 0 : 1);