aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2019-06-24 13:09:47 +0100
committerJonathan Wakely <redi@gcc.gnu.org>2019-06-24 13:09:47 +0100
commitff164b601b75a9aba47edfaa9a215cb376ab055e (patch)
tree79992f00c4ec2d5d269ac3af55a7aad0657cda71 /gcc
parentefe8764f72a2706136ca588c6ee734c48e803885 (diff)
downloadgcc-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')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/ginclude/float.h3
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 4242c98..85c286a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2019-06-24 Jonathan Wakely <jwakely@redhat.com>
+
+ * ginclude/float.h (FLT_DECIMAL_DIG, DBL_DECIMAL_DIG, LDBL_DECIMAL_DIG)
+ (FLT_HAS_SUBNORM, DBL_HAS_SUBNORM, LDBL_HAS_SUBNORM, FLT_TRUE_MIN)
+ (DBL_TRUE_MIN, LDBL_TRUE_MIN): Also define for C++17.
+
2019-06-23 Iain Sandoe <iain@sandoe.co.uk>
* config/rs6000/darwin.h: Handle GCC target pragma.
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