This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] float.h checks __STDC_WANT_DEC_FP is defined, not 1
- From: Janis Johnson <janis187 at us dot ibm dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 18 Apr 2007 15:50:04 -0700
- Subject: [PATCH] float.h checks __STDC_WANT_DEC_FP is defined, not 1
WDTR 24732 says that macros supporting decimal floating point types
are defined in <float.h> if the macro __STDC_WANT_DEC_FP__ is defined
at the point where <float.h> is included. This patch fixes the check
of this macro to see if it is defined, not that it is defined as 1.
Tested on powerpc64-unknown-linux-gnu with -m32/-m64. OK for mainline?
2007-04-18 Janis Johnson <janis187@us.ibm.com>
* ginclude/float.h: Check that __STDC_WANT_DEC_FP__ is defined,
not that it is 1.
Index: gcc/ginclude/float.h
===================================================================
--- gcc/ginclude/float.h (revision 123951)
+++ gcc/ginclude/float.h (working copy)
@@ -160,7 +160,7 @@
#endif /* C99 */
-#if __STDC_WANT_DEC_FP__ == 1
+#ifdef __STDC_WANT_DEC_FP__
/* Draft Technical Report 24732, extension for decimal floating-point
arithmetic: Characteristic of decimal floating types <float.h>. */
@@ -236,6 +236,6 @@
#undef DECFLT_EVAL_METHOD
#define DECFLT_EVAL_METHOD __DECFLT_EVAL_METHOD__
-#endif /* __STDC_WANT_DEC_FP__ == 1 */
+#endif /* __STDC_WANT_DEC_FP__ */
#endif /* _FLOAT_H___ */