Test for the presence of a bunch of new macros for c++17. These macros come from C11. Part of P0063

llvm-svn: 338454
This commit is contained in:
Marshall Clow 2018-07-31 23:29:06 +00:00
parent ae43a27f9c
commit 5802ab265c
4 changed files with 105 additions and 0 deletions

View File

@ -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>

View File

@ -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>

View File

@ -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()
{
}

View File

@ -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()
{
}