diff options
Diffstat (limited to 'clang/lib/Headers/float.h')
-rw-r--r-- | clang/lib/Headers/float.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/lib/Headers/float.h b/clang/lib/Headers/float.h index 84551af..30427c2 100644 --- a/clang/lib/Headers/float.h +++ b/clang/lib/Headers/float.h @@ -89,6 +89,9 @@ !defined(__STRICT_ANSI__) # undef INFINITY # undef NAN +# undef FLT_SNAN +# undef DBL_SNAN +# undef LDBL_SNAN #endif /* Characteristics of floating point types, C99 5.2.4.2.2 */ @@ -160,9 +163,15 @@ #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L) || \ !defined(__STRICT_ANSI__) + /* C23 5.2.5.3.2p28 */ +# define FLT_SNAN (__builtin_nansf("")) +# define DBL_SNAN (__builtin_nans("")) +# define LDBL_SNAN (__builtin_nansl("")) + /* C23 5.2.5.3.3p29-30 */ # define INFINITY (__builtin_inff()) # define NAN (__builtin_nanf("")) + /* C23 5.2.5.3.3p32 */ # define FLT_NORM_MAX __FLT_NORM_MAX__ # define DBL_NORM_MAX __DBL_NORM_MAX__ |