[libcxx] r338454 - Test for the presence of a bunch of new macros for c++17. These macros come from C11. Part of P0063

Marshall Clow via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 31 16:29:06 PDT 2018


Author: marshall
Date: Tue Jul 31 16:29:06 2018
New Revision: 338454

URL: http://llvm.org/viewvc/llvm-project?rev=338454&view=rev
Log:
Test for the presence of a bunch of new macros for c++17. These macros come from C11. Part of P0063

Modified:
    libcxx/trunk/include/cfloat
    libcxx/trunk/include/float.h
    libcxx/trunk/test/std/depr/depr.c.headers/float_h.pass.cpp
    libcxx/trunk/test/std/language.support/support.limits/c.limits/cfloat.pass.cpp

Modified: libcxx/trunk/include/cfloat
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/cfloat?rev=338454&r1=338453&r2=338454&view=diff
==============================================================================
--- libcxx/trunk/include/cfloat (original)
+++ libcxx/trunk/include/cfloat Tue Jul 31 16:29:06 2018
@@ -20,11 +20,18 @@ Macros:
     FLT_EVAL_METHOD     // C99
     FLT_RADIX
 
+    FLT_HAS_SUBNORM     // C11
+    DBL_HAS_SUBNORM     // C11
+    LDBL_HAS_SUBNORM    // C11
+
     FLT_MANT_DIG
     DBL_MANT_DIG
     LDBL_MANT_DIG
 
     DECIMAL_DIG         // C99
+    FLT_DECIMAL_DIG     // C11
+    DBL_DECIMAL_DIG     // C11
+    LDBL_DECIMAL_DIG    // C11
 
     FLT_DIG
     DBL_DIG
@@ -58,6 +65,9 @@ Macros:
     DBL_MIN
     LDBL_MIN
 
+    FLT_TRUE_MIN        // C11
+    DBL_TRUE_MIN        // C11
+    LDBL_TRUE_MIN       // C11
 */
 
 #include <__config>

Modified: libcxx/trunk/include/float.h
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/float.h?rev=338454&r1=338453&r2=338454&view=diff
==============================================================================
--- libcxx/trunk/include/float.h (original)
+++ libcxx/trunk/include/float.h Tue Jul 31 16:29:06 2018
@@ -24,7 +24,14 @@ Macros:
     DBL_MANT_DIG
     LDBL_MANT_DIG
 
+    FLT_HAS_SUBNORM     // C11
+    DBL_HAS_SUBNORM     // C11
+    LDBL_HAS_SUBNORM    // C11
+
     DECIMAL_DIG         // C99
+    FLT_DECIMAL_DIG     // C11
+    DBL_DECIMAL_DIG     // C11
+    LDBL_DECIMAL_DIG    // C11
 
     FLT_DIG
     DBL_DIG
@@ -58,6 +65,10 @@ Macros:
     DBL_MIN
     LDBL_MIN
 
+    FLT_TRUE_MIN        // C11
+    DBL_TRUE_MIN        // C11
+    LDBL_TRUE_MIN       // C11
+
 */
 
 #include <__config>

Modified: libcxx/trunk/test/std/depr/depr.c.headers/float_h.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/depr/depr.c.headers/float_h.pass.cpp?rev=338454&r1=338453&r2=338454&view=diff
==============================================================================
--- libcxx/trunk/test/std/depr/depr.c.headers/float_h.pass.cpp (original)
+++ libcxx/trunk/test/std/depr/depr.c.headers/float_h.pass.cpp Tue Jul 31 16:29:06 2018
@@ -23,6 +23,20 @@
 #error FLT_RADIX not defined
 #endif
 
+#if TEST_STD_VER > 14 && defined(TEST_HAS_C11_FEATURES)
+#ifndef FLT_HAS_SUBNORM
+#error FLT_HAS_SUBNORM not defined
+#endif
+
+#ifndef DBL_HAS_SUBNORM
+#error DBL_HAS_SUBNORM not defined
+#endif
+
+#ifndef LDBL_HAS_SUBNORM
+#error LDBL_HAS_SUBNORM not defined
+#endif
+#endif
+
 #ifndef FLT_MANT_DIG
 #error FLT_MANT_DIG not defined
 #endif
@@ -39,6 +53,20 @@
 #error DECIMAL_DIG not defined
 #endif
 
+#if TEST_STD_VER > 14 && defined(TEST_HAS_C11_FEATURES)
+#ifndef FLT_DECIMAL_DIG
+#error FLT_DECIMAL_DIG not defined
+#endif
+
+#ifndef DBL_DECIMAL_DIG
+#error DBL_DECIMAL_DIG not defined
+#endif
+
+#ifndef LDBL_DECIMAL_DIG
+#error LDBL_DECIMAL_DIG not defined
+#endif
+#endif
+
 #ifndef FLT_DIG
 #error FLT_DIG not defined
 #endif
@@ -135,6 +163,20 @@
 #error LDBL_MIN not defined
 #endif
 
+#if TEST_STD_VER > 14 && defined(TEST_HAS_C11_FEATURES)
+#ifndef FLT_TRUE_MIN
+#error FLT_TRUE_MIN not defined
+#endif
+
+#ifndef DBL_TRUE_MIN
+#error DBL_TRUE_MIN not defined
+#endif
+
+#ifndef LDBL_TRUE_MIN
+#error LDBL_TRUE_MIN not defined
+#endif
+#endif
+
 int main()
 {
 }

Modified: libcxx/trunk/test/std/language.support/support.limits/c.limits/cfloat.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/language.support/support.limits/c.limits/cfloat.pass.cpp?rev=338454&r1=338453&r2=338454&view=diff
==============================================================================
--- libcxx/trunk/test/std/language.support/support.limits/c.limits/cfloat.pass.cpp (original)
+++ libcxx/trunk/test/std/language.support/support.limits/c.limits/cfloat.pass.cpp Tue Jul 31 16:29:06 2018
@@ -23,6 +23,20 @@
 #error FLT_RADIX not defined
 #endif
 
+#if TEST_STD_VER > 14 && defined(TEST_HAS_C11_FEATURES)
+#ifndef FLT_HAS_SUBNORM
+#error FLT_HAS_SUBNORM not defined
+#endif
+
+#ifndef DBL_HAS_SUBNORM
+#error DBL_HAS_SUBNORM not defined
+#endif
+
+#ifndef LDBL_HAS_SUBNORM
+#error LDBL_HAS_SUBNORM not defined
+#endif
+#endif
+
 #ifndef FLT_MANT_DIG
 #error FLT_MANT_DIG not defined
 #endif
@@ -39,6 +53,20 @@
 #error DECIMAL_DIG not defined
 #endif
 
+#if TEST_STD_VER > 14 && defined(TEST_HAS_C11_FEATURES)
+#ifndef FLT_DECIMAL_DIG
+#error FLT_DECIMAL_DIG not defined
+#endif
+
+#ifndef DBL_DECIMAL_DIG
+#error DBL_DECIMAL_DIG not defined
+#endif
+
+#ifndef LDBL_DECIMAL_DIG
+#error LDBL_DECIMAL_DIG not defined
+#endif
+#endif
+
 #ifndef FLT_DIG
 #error FLT_DIG not defined
 #endif
@@ -135,6 +163,20 @@
 #error LDBL_MIN not defined
 #endif
 
+#if TEST_STD_VER > 14 && defined(TEST_HAS_C11_FEATURES)
+#ifndef FLT_TRUE_MIN
+#error FLT_TRUE_MIN not defined
+#endif
+
+#ifndef DBL_TRUE_MIN
+#error DBL_TRUE_MIN not defined
+#endif
+
+#ifndef LDBL_TRUE_MIN
+#error LDBL_TRUE_MIN not defined
+#endif
+#endif
+
 int main()
 {
 }




More information about the cfe-commits mailing list