Browse Source

[build] Avoid strict-aliasing warning for gcc 4.3

Signed-off-by: Bo Yang <boyang@suse.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Bo Yang 11 years ago
parent
commit
11ad0bafbf
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      src/arch/i386/include/bits/byteswap.h

+ 2
- 2
src/arch/i386/include/bits/byteswap.h View File

@@ -53,8 +53,8 @@ __bswap_variable_64 ( uint64_t x ) {
53 53
 static inline __attribute__ (( always_inline )) void
54 54
 __bswap_64s ( uint64_t *x ) {
55 55
 	struct {
56
-		uint32_t low;
57
-		uint32_t high;
56
+		uint32_t __attribute__ (( may_alias )) low;
57
+		uint32_t __attribute__ (( may_alias )) high;
58 58
 	} __attribute__ (( may_alias )) *dwords = ( ( void * ) x );
59 59
 	uint32_t discard;
60 60
 

Loading…
Cancel
Save