[ipxe-devel] [PATCH] Avoid strict-aliasing warning for gcc 4.3.

Bo Yang boyang at suse.com
Wed Mar 20 08:34:17 UTC 2013


Signed-off-by: Bo Yang <boyang at suse.com>
---
 src/arch/i386/include/bits/byteswap.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/arch/i386/include/bits/byteswap.h b/src/arch/i386/include/bits/byteswap.h
index f3d30a2..0d9cb96 100644
--- a/src/arch/i386/include/bits/byteswap.h
+++ b/src/arch/i386/include/bits/byteswap.h
@@ -53,8 +53,8 @@ __bswap_variable_64 ( uint64_t x ) {
 static inline __attribute__ (( always_inline )) void
 __bswap_64s ( uint64_t *x ) {
 	struct {
-		uint32_t low;
-		uint32_t high;
+		uint32_t __attribute__ (( may_alias )) low;
+		uint32_t __attribute__ (( may_alias )) high;
 	} __attribute__ (( may_alias )) *dwords = ( ( void * ) x );
 	uint32_t discard;
 
-- 
1.6.0.2




More information about the ipxe-devel mailing list