float.h: C2x *_IS_IEC_60559 macros
authorJoseph Myers <joseph@codesourcery.com>
Tue, 17 Nov 2020 16:25:45 +0000 (16:25 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Tue, 17 Nov 2020 16:28:11 +0000 (16:28 +0000)
commitac30c8b8d035cd9259040150f059f1cf3542f626
tree74a267e1b58daaf2b2dc87c438f06a7bc7d88b5d
parent8895913273b97d07f9576f5eb497d39b78166daf
float.h: C2x *_IS_IEC_60559 macros

C2x adds float.h macros that say whether float, double and long double
match an IEC 60559 (IEEE 754) format and operations.  Add these
macros to GCC's float.h.

Bootstrapped with no regressions for x86_64-pc-linux-gnu.

gcc/c-family/
2020-11-17  Joseph Myers  <joseph@codesourcery.com>

* c-cppbuiltin.c (builtin_define_float_constants): Define
"*_IS_IEC_60559__" macros.

gcc/
2020-11-17  Joseph Myers  <joseph@codesourcery.com>

* ginclude/float.h [__STDC_VERSION__ > 201710L] (FLT_IS_IEC_60559,
DBL_IS_IEC_60559, LDBL_IS_IEC_60559): New macros.

gcc/testsuite/
2020-11-17  Joseph Myers  <joseph@codesourcery.com>

* gcc.dg/c11-float-6.c, gcc.dg/c2x-float-10.c: New tests.
gcc/c-family/c-cppbuiltin.c
gcc/ginclude/float.h
gcc/testsuite/gcc.dg/c11-float-6.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/c2x-float-10.c [new file with mode: 0644]