aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/dfp/dec-eval-method-2.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.dg/dfp/dec-eval-method-2.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/dfp/dec-eval-method-2.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/dfp/dec-eval-method-2.c b/gcc-4.9/gcc/testsuite/gcc.dg/dfp/dec-eval-method-2.c
new file mode 100644
index 000000000..b87f159bf
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/dfp/dec-eval-method-2.c
@@ -0,0 +1,20 @@
+/* { dg-do compile } */
+/* { dg-options "-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;