gcc/
authorjanis <janis@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 11 Sep 2008 22:50:51 +0000 (22:50 +0000)
committerjanis <janis@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 11 Sep 2008 22:50:51 +0000 (22:50 +0000)
* ginclude/float.h (DEC_EVAL_METHOD): Correct the macro name.
gcc/testsuite
* gcc.dg/dfp/dec-eval-method-2.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@140301 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/ginclude/float.h
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/dfp/dec-eval-method-2.c [new file with mode: 0644]

index 6bd0082..dea503e 100644 (file)
@@ -1,3 +1,7 @@
+2008-09-11  Janis Johnson  <janis187@us.ibm.com>
+
+       * ginclude/float.h (DEC_EVAL_METHOD): Correct the macro name.
+
 2008-09-11  Richard Guenther  <rguenther@suse.de>
 
        * tree-ssa-uncprop.c (associate_equivalences_with_edges): Avoid
index 23ce8f4..5d9f918 100644 (file)
@@ -233,8 +233,8 @@ Boston, MA 02110-1301, USA.  */
         2  evaluate all operations and constants to the range and
            precision of the _Decimal128 type.  */
 
-#undef DECFLT_EVAL_METHOD
-#define DECFLT_EVAL_METHOD     __DECFLT_EVAL_METHOD__
+#undef DEC_EVAL_METHOD
+#define DEC_EVAL_METHOD        __DEC_EVAL_METHOD__
 
 #endif /* __STDC_WANT_DEC_FP__ */
 
index 5407fdd..430fef4 100644 (file)
@@ -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 (file)
index 0000000..55001cc
--- /dev/null
@@ -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;