From ff164b601b75a9aba47edfaa9a215cb376ab055e Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Mon, 24 Jun 2019 13:09:47 +0100 Subject: 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 --- gcc/ginclude/float.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gcc/ginclude') 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 -- cgit v1.1