This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
V3 PATCH: #undef abs (was Re: libstdc++ change breaks simple code)
- To: Mixtim <mixtim at home dot com>
- Subject: V3 PATCH: #undef abs (was Re: libstdc++ change breaks simple code)
- From: Gabriel Dos Reis <Gabriel dot Dos-Reis at cmla dot ens-cachan dot fr>
- Date: 26 May 2001 09:11:08 +0200
- Cc: gcc at gcc dot gnu dot org, libstdc++ at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Organization: CMLA, ENS Cachan -- CNRS UMR 8536 (France)
- References: <20010525234351.A69498@home.com>
Mixtim <mixtim@home.com> writes:
| Here is the code in question:
|
| #include <cmath>
|
| using namespace std;
|
| int
| main()
| {
| double d = sqrt(1.0);
| return 0;
| }
|
| gcc version 3.0 20010520 (prerelease) compiles this fine.
|
| gcc version 3.0 20010525 (prerelease) barfs.
That is a latent bug. Fixed with this.
-- Gaby
2001-05-26 Gabriel Dos Reis <gdr@codesourcery.com>
* include/c_std/bits/std_cmath.h (sqrt): #undef.
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.2.3
diff -p -r1.6.2.3 std_cmath.h
*** std_cmath.h 2001/05/25 21:40:45 1.6.2.3
--- std_cmath.h 2001/05/26 07:00:03
***************
*** 74,79 ****
--- 74,80 ----
#undef pow
#undef sin
#undef sinh
+ #undef sqrt
#undef tan
#undef tanh