diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2019-06-24 13:09:47 +0100 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2019-06-24 13:09:47 +0100 |
commit | ff164b601b75a9aba47edfaa9a215cb376ab055e (patch) | |
tree | 79992f00c4ec2d5d269ac3af55a7aad0657cda71 /gcc/ginclude/float.h | |
parent | efe8764f72a2706136ca588c6ee734c48e803885 (diff) | |
download | gcc-ff164b601b75a9aba47edfaa9a215cb376ab055e.zip gcc-ff164b601b75a9aba47edfaa9a215cb376ab055e.tar.gz gcc-ff164b601b75a9aba47edfaa9a215cb376ab055e.tar.bz2 |
Define C11 macros such as FLT_DECIMAL_DIG for C++17
* testsuite/18_support/headers/cfloat/values_c++17.cc: New test.
From-SVN: r272615
Diffstat (limited to 'gcc/ginclude/float.h')
-rw-r--r-- | gcc/ginclude/float.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/ginclude/float.h b/gcc/ginclude/float.h index 9ebae05..4767d7b 100644 --- a/gcc/ginclude/float.h +++ b/gcc/ginclude/float.h @@ -210,7 +210,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #endif /* C99 */ -#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L +#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) \ + || (defined (__cplusplus) && __cplusplus >= 201703L) /* Versions of DECIMAL_DIG for each floating-point type. */ #undef FLT_DECIMAL_DIG #undef DBL_DECIMAL_DIG |