Protect use of long long by __extension__.
authordrepper <drepper>
Thu, 1 Oct 1998 10:59:58 +0000 (10:59 +0000)
committerdrepper <drepper>
Thu, 1 Oct 1998 10:59:58 +0000 (10:59 +0000)
bits/byteswap.h
sysdeps/generic/bits/byteswap.h

index a5dd4a7..73189cf 100644 (file)
@@ -54,10 +54,11 @@ __bswap32 (unsigned int x)
 #if defined __GNUC__ && __GNUC__ >= 2
 /* Swap bytes in 64 bit value.  */
 # define __bswap_64(x) \
-     ({ union { unsigned long long int __ll;                                 \
-               unsigned long int __l[2]; } __v, __r;                         \
-        __v.__ll = (x);                                                              \
-       __r.__l[0] = __bswap_32 (__v.__l[1]);                                 \
-       __r.__l[1] = __bswap_32 (__v.__l[0]);                                 \
-       __r.__ll; })
+     (__extension__                                                          \
+      ({ union { unsigned long long int __ll;                                \
+                unsigned long int __l[2]; } __v, __r;                        \
+        __v.__ll = (x);                                                      \
+        __r.__l[0] = __bswap_32 (__v.__l[1]);                                \
+        __r.__l[1] = __bswap_32 (__v.__l[0]);                                \
+        __r.__ll; }))
 #endif
index a5dd4a7..73189cf 100644 (file)
@@ -54,10 +54,11 @@ __bswap32 (unsigned int x)
 #if defined __GNUC__ && __GNUC__ >= 2
 /* Swap bytes in 64 bit value.  */
 # define __bswap_64(x) \
-     ({ union { unsigned long long int __ll;                                 \
-               unsigned long int __l[2]; } __v, __r;                         \
-        __v.__ll = (x);                                                              \
-       __r.__l[0] = __bswap_32 (__v.__l[1]);                                 \
-       __r.__l[1] = __bswap_32 (__v.__l[0]);                                 \
-       __r.__ll; })
+     (__extension__                                                          \
+      ({ union { unsigned long long int __ll;                                \
+                unsigned long int __l[2]; } __v, __r;                        \
+        __v.__ll = (x);                                                      \
+        __r.__l[0] = __bswap_32 (__v.__l[1]);                                \
+        __r.__l[1] = __bswap_32 (__v.__l[0]);                                \
+        __r.__ll; }))
 #endif