aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorJanis Johnson <janis187@us.ibm.com>2008-09-11 22:50:51 +0000
committerJanis Johnson <janis@gcc.gnu.org>2008-09-11 22:50:51 +0000
commit7ecb6f5bd0216ff59fbb8947f99edcc8099d22bc (patch)
tree48c44f2516b4b389008f8c140e5b6e51d1a122c6 /gcc/testsuite
parente49a540c1272d1658df36ab0c5db721ba63d3764 (diff)
downloadgcc-7ecb6f5bd0216ff59fbb8947f99edcc8099d22bc.zip
gcc-7ecb6f5bd0216ff59fbb8947f99edcc8099d22bc.tar.gz
gcc-7ecb6f5bd0216ff59fbb8947f99edcc8099d22bc.tar.bz2
float.h (DEC_EVAL_METHOD): Correct the macro name.
gcc/ * ginclude/float.h (DEC_EVAL_METHOD): Correct the macro name. gcc/testsuite * gcc.dg/dfp/dec-eval-method-2.c: New test. From-SVN: r140301
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/gcc.dg/dfp/dec-eval-method-2.c20
2 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 5407fdd..430fef4 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2008-09-11 Janis Johnson <janis187@us.ibm.com>
+
+ * gcc.dg/dfp/dec-eval-method-2.c: New test.
+
2008-09-11 Joseph Myers <joseph@codesourcery.com>
* lib/compat.exp, gcc.dg/compat/struct-layout-1.exp,
diff --git a/gcc/testsuite/gcc.dg/dfp/dec-eval-method-2.c b/gcc/testsuite/gcc.dg/dfp/dec-eval-method-2.c
new file mode 100644
index 0000000..55001cc
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/dfp/dec-eval-method-2.c
@@ -0,0 +1,20 @@
+/* { dg-do compile } */
+/* { dg-options "-std=gnu99 -D__STDC_WANT_DEC_FP__" } */
+
+/* N1107 4: Characteristics of decimal floating types <float.h>.
+ C99 5.2.4.2.2a[2] (New).
+
+ Verify that DEC_EVAL_METHOD is defined by float.h.
+ DEC_EVAL_METHOD in <float.h>. */
+
+#ifdef DEC_EVAL_METHOD
+#error DEC_EVAL_METHOD is defined before float.h is included
+#endif
+
+#include <float.h>
+
+#ifndef DEC_EVAL_METHOD
+#error DEC_EVAL_METHOD is not defined after float.h is included
+#endif
+
+int i;