From 67e971f18ffc9b3ea57cbccba54d5203d1e6a988 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Thu, 28 Feb 2013 17:12:25 +0100 Subject: Better distinguish between NaN/qNaN/sNaN. --- sysdeps/ieee754/bits/nan.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'sysdeps/ieee754/bits') diff --git a/sysdeps/ieee754/bits/nan.h b/sysdeps/ieee754/bits/nan.h index 935271a7c0..41f47ba097 100644 --- a/sysdeps/ieee754/bits/nan.h +++ b/sysdeps/ieee754/bits/nan.h @@ -39,14 +39,14 @@ # include # if __BYTE_ORDER == __BIG_ENDIAN -# define __nan_bytes { 0x7f, 0xc0, 0, 0 } +# define __qnan_bytes { 0x7f, 0xc0, 0, 0 } # endif # if __BYTE_ORDER == __LITTLE_ENDIAN -# define __nan_bytes { 0, 0, 0xc0, 0x7f } +# define __qnan_bytes { 0, 0, 0xc0, 0x7f } # endif -static union { unsigned char __c[4]; float __d; } __nan_union - __attribute__ ((__unused__)) = { __nan_bytes }; -# define NAN (__nan_union.__d) +static union { unsigned char __c[4]; float __d; } __qnan_union + __attribute__ ((__unused__)) = { __qnan_bytes }; +# define NAN (__qnan_union.__d) #endif /* GCC. */ -- cgit 1.4.1