This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

V3 PATCH: #undef some C99 math macros in <cmath>



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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]