From: Hubert Tong Date: Fri, 12 Feb 2016 19:24:36 +0000 (+0000) Subject: test/Headers/float.c: fix theoretical edge values X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=70692f3f2fc2a6fb43ade8215c12ba4a2f398077;p=clang test/Headers/float.c: fix theoretical edge values For *_MANT_DIG, *_MAX_EXP and *_MIN_EXP, the C Standard does not list the least requirements directly. This patch adjusts the test values with refined ones. Patch by Jorge Teixeira! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@260710 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/Headers/float.c b/test/Headers/float.c index 32249d1d46..46e9cc3fd9 100644 --- a/test/Headers/float.c +++ b/test/Headers/float.c @@ -24,17 +24,17 @@ #ifndef FLT_MANT_DIG #error "Mandatory macro FLT_MANT_DIG is missing." -#elif FLT_MANT_DIG < 1 +#elif FLT_MANT_DIG < 2 #error "Mandatory macro FLT_MANT_DIG is invalid." #endif #ifndef DBL_MANT_DIG #error "Mandatory macro DBL_MANT_DIG is missing." -#elif DBL_MANT_DIG < 1 +#elif DBL_MANT_DIG < 2 #error "Mandatory macro DBL_MANT_DIG is invalid." #endif #ifndef LDBL_MANT_DIG #error "Mandatory macro LDBL_MANT_DIG is missing." -#elif LDBL_MANT_DIG < 1 +#elif LDBL_MANT_DIG < 2 #error "Mandatory macro LDBL_MANT_DIG is invalid." #endif #if ((FLT_MANT_DIG > DBL_MANT_DIG) || (DBL_MANT_DIG > LDBL_MANT_DIG)) @@ -108,18 +108,18 @@ #ifndef FLT_MIN_EXP - #error "Mandatory macro _MIN_EXP is missing." -#elif FLT_MIN_EXP > -2 - #error "Mandatory macro _MIN_EXP is invalid." + #error "Mandatory macro FLT_MIN_EXP is missing." +#elif FLT_MIN_EXP > -1 + #error "Mandatory macro FLT_MIN_EXP is invalid." #endif #ifndef DBL_MIN_EXP #error "Mandatory macro DBL_MIN_EXP is missing." -#elif DBL_MIN_EXP > -2 +#elif DBL_MIN_EXP > -1 #error "Mandatory macro DBL_MIN_EXP is invalid." #endif #ifndef LDBL_MIN_EXP #error "Mandatory macro LDBL_MIN_EXP is missing." -#elif LDBL_MIN_EXP > -2 +#elif LDBL_MIN_EXP > -1 #error "Mandatory macro LDBL_MIN_EXP is invalid." #endif @@ -143,17 +143,17 @@ #ifndef FLT_MAX_EXP #error "Mandatory macro FLT_MAX_EXP is missing." -#elif FLT_MAX_EXP < 2 +#elif FLT_MAX_EXP < 1 #error "Mandatory macro FLT_MAX_EXP is invalid." #endif #ifndef DBL_MAX_EXP #error "Mandatory macro DBL_MAX_EXP is missing." -#elif DBL_MAX_EXP < 2 +#elif DBL_MAX_EXP < 1 #error "Mandatory macro DBL_MAX_EXP is invalid." #endif #ifndef LDBL_MAX_EXP #error "Mandatory macro LDBL_MAX_EXP is missing." -#elif LDBL_MAX_EXP < 2 +#elif LDBL_MAX_EXP < 1 #error "Mandatory macro LDBL_MAX_EXP is invalid." #endif #if ((FLT_MAX_EXP > DBL_MAX_EXP) || (DBL_MAX_EXP > LDBL_MAX_EXP))