V3 PATCH: #undef abs (was Re: libstdc++ change breaks simple code)
Gabriel Dos Reis
Gabriel.Dos-Reis@cmla.ens-cachan.fr
Sat May 26 00:11:00 GMT 2001
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
More information about the Libstdc++
mailing list