diff --git a/xxhash.h b/xxhash.h index 1ad2ddb6..17498146 100644 --- a/xxhash.h +++ b/xxhash.h @@ -2661,7 +2661,7 @@ typedef union { xxh_u32 u32; } __attribute__((__packed__)) unalign; #endif static xxh_u32 XXH_read32(const void* ptr) { - typedef __attribute__((__aligned__(1))) xxh_u32 xxh_unalign32; + typedef __attribute__((__aligned__(1))) __attribute__((__may_alias__)) xxh_u32 xxh_unalign32; return *((const xxh_unalign32*)ptr); } @@ -3374,7 +3374,7 @@ typedef union { xxh_u32 u32; xxh_u64 u64; } __attribute__((__packed__)) unalign6 #endif static xxh_u64 XXH_read64(const void* ptr) { - typedef __attribute__((__aligned__(1))) xxh_u64 xxh_unalign64; + typedef __attribute__((__aligned__(1))) __attribute__((__may_alias__)) xxh_u64 xxh_unalign64; return *((const xxh_unalign64*)ptr); }