diff options
author | Joseph Myers <joseph@codesourcery.com> | 2022-10-13 01:13:36 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2022-10-13 01:13:36 +0000 |
commit | e867f6b7e636391cf70a8d9b9bac79248b3fad67 (patch) | |
tree | e98b0eb46994262c531cb9735c246ffd799c95a1 /gcc/c-family/c-cppbuiltin.cc | |
parent | 781f477a13ae14ca661018518f4d4a9e6881b0dd (diff) | |
download | gcc-e867f6b7e636391cf70a8d9b9bac79248b3fad67.zip gcc-e867f6b7e636391cf70a8d9b9bac79248b3fad67.tar.gz gcc-e867f6b7e636391cf70a8d9b9bac79248b3fad67.tar.bz2 |
c: Do not use *_IS_IEC_60559 == 2
A late change for C2x (addressing comments from the second round of
editorial review before the CD ballot, postdating the most recent
public working draft) removed the value 2 for *_IS_IEC_60559 (a new
<float.h> macro added in C2x). Adjust the implementation accordingly
not to use this value.
Bootstrapped with no regressions for x86_64-pc-linux-gnu.
gcc/
* ginclude/float.h (FLT_IS_IEC_60559, DBL_IS_IEC_60559)
(LDBL_IS_IEC_60559): Update comment.
gcc/c-family/
* c-cppbuiltin.cc (builtin_define_float_constants): Do not use
value 2 for *_IS_IEC_60559.
gcc/testsuite/
* gcc.dg/c2x-float-10.c: Do not expect value 2 for *_IS_IEC_60559.
Diffstat (limited to 'gcc/c-family/c-cppbuiltin.cc')
-rw-r--r-- | gcc/c-family/c-cppbuiltin.cc | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/gcc/c-family/c-cppbuiltin.cc b/gcc/c-family/c-cppbuiltin.cc index 4b8486c..2e39acb 100644 --- a/gcc/c-family/c-cppbuiltin.cc +++ b/gcc/c-family/c-cppbuiltin.cc @@ -319,14 +319,10 @@ builtin_define_float_constants (const char *name_prefix, } /* For C2x *_IS_IEC_60559. 0 means the type does not match an IEC - 60559 format, 1 that it matches a format but not operations and 2 - that it matches a format and operations (but may not conform to - Annex F; we take this as meaning exceptions and rounding modes - need not be supported). */ + 60559 format, 1 that it matches a format but not necessarily + operations. */ sprintf (name, "__%s_IS_IEC_60559__", name_prefix); - builtin_define_with_int_value (name, - (fmt->ieee_bits == 0 - ? 0 : (fmt->round_towards_zero ? 1 : 2))); + builtin_define_with_int_value (name, fmt->ieee_bits != 0); } /* Define __DECx__ constants for TYPE using NAME_PREFIX and SUFFIX. */ |