r260710 - test/Headers/float.c: fix theoretical edge values
Hubert Tong via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 12 11:24:36 PST 2016
Author: hubert.reinterpretcast
Date: Fri Feb 12 13:24:36 2016
New Revision: 260710
URL: http://llvm.org/viewvc/llvm-project?rev=260710&view=rev
Log:
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!
Modified:
cfe/trunk/test/Headers/float.c
Modified: cfe/trunk/test/Headers/float.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Headers/float.c?rev=260710&r1=260709&r2=260710&view=diff
==============================================================================
--- cfe/trunk/test/Headers/float.c (original)
+++ cfe/trunk/test/Headers/float.c Fri Feb 12 13:24:36 2016
@@ -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))
More information about the cfe-commits
mailing list