diff options
author | Thomas Schwinge <thomas@codesourcery.com> | 2013-02-28 17:12:25 +0100 |
---|---|---|
committer | Thomas Schwinge <thomas@codesourcery.com> | 2013-03-15 19:06:02 +0100 |
commit | 67e971f18ffc9b3ea57cbccba54d5203d1e6a988 (patch) | |
tree | f62ff6123ac01815295b6d6f6f9dba73c1c65862 /sysdeps/ieee754 | |
parent | 64487e126468f91ecdfe7ab7a0f3a82762874d5a (diff) | |
download | glibc-67e971f18ffc9b3ea57cbccba54d5203d1e6a988.zip glibc-67e971f18ffc9b3ea57cbccba54d5203d1e6a988.tar.gz glibc-67e971f18ffc9b3ea57cbccba54d5203d1e6a988.tar.bz2 |
Better distinguish between NaN/qNaN/sNaN.
Diffstat (limited to 'sysdeps/ieee754')
-rw-r--r-- | sysdeps/ieee754/bits/nan.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sysdeps/ieee754/bits/nan.h b/sysdeps/ieee754/bits/nan.h index 935271a..41f47ba 100644 --- a/sysdeps/ieee754/bits/nan.h +++ b/sysdeps/ieee754/bits/nan.h @@ -39,14 +39,14 @@ # include <endian.h> # 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. */ |