This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
V3 PATCH: #undef some C99 math macros in <cmath>
- To: gcc-patches at gcc dot gnu dot org
- Subject: V3 PATCH: #undef some C99 math macros in <cmath>
- From: Gabriel Dos Reis <Gabriel dot Dos-Reis at cmla dot ens-cachan dot fr>
- Date: 06 Apr 2001 03:52:00 +0200
- Cc: libstdc++ at gcc dot gnu dot org
- Organization: CMLA, ENS Cachan -- CNRS UMR 8536 (France)
This patch solves problem
http://gcc.gnu.org/ml/gcc-bugs/2001-03/msg00524.html
Applied only to branch -- I'm unable to build from mainline because of
the problem reported by Nathan Sidwell.
-- Gaby
2001-04-06 Gabriel Dos Reis <gdr@codesourcery.com>
* include/c_std/bits/std_cmath.h: Get rid of C99 math macros.
Index: include/c_std/bits/std_cmath.h
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/include/c_std/bits/std_cmath.h,v
retrieving revision 1.6
diff -p -r1.6 std_cmath.h
*** std_cmath.h 2001/02/05 22:27:40 1.6
--- std_cmath.h 2001/04/06 01:40:27
***************
*** 67,72 ****
--- 67,90 ----
#undef tan
#undef tanh
+ // These are possible macros imported from C99-land. They tend to break
+ // well-formed C++ programs. Just pretend we don't know about them.
+ // At some point, we should provide extensions in std:: -- Gaby
+
+ #undef fpclassify
+ #undef isfinite
+ #undef isinf
+ #undef isnan
+ #undef isnormal
+ #undef signbit
+
+ #undef isgreater
+ #undef isgreaterequal
+ #undef isless
+ #undef islessequal
+ #undef islessgreater
+ #undef isunordered
+
namespace std
{
// Forward declaration of a helper function. This really should be