This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: 3 new fails with builtin patch
- From: Paolo Carlini <pcarlini at unitus dot it>
- To: Benjamin Kosnik <bkoz at redhat dot com>
- Cc: libstdc++ at gcc dot gnu dot org, roger at eyesopen dot com
- Date: Sat, 30 Mar 2002 12:14:35 +0100
- Subject: Re: 3 new fails with builtin patch
- References: <200203300908.g2U98jO21394@fillmore.constant.com>
Benjamin Kosnik wrote:
>I now see these when doing 'make check' after:
>
>2002-03-28 Roger Sayle <roger@eyesopen.com>
>
> * include/c_std/std_cmath.h: To prevent problems overloading
> g++ builtins, use the double variants from the global namespace
> before defining float and long double variants in std::.
>
>
>FAIL: 26_numerics/complex_value.cc (test for excess errors)
>WARNING: 26_numerics/complex_value.cc compilation failed to produce executable
>FAIL: 26_numerics/valarray.cc (test for excess errors)
>WARNING: 26_numerics/valarray.cc compilation failed to produce executable
>FAIL: 27_io/ostream_inserter_arith.cc (test for excess errors)
>WARNING: 27_io/ostream_inserter_arith.cc compilation failed to produce executable
>
Hi all,
this is a reduced testcase:
#include <cmath>
int main()
{
double num = 1.234;
std::abs(num);
}
/tmp/ccMeiPRN.o: In function `main':
/tmp/ccMeiPRN.o(.text+0x2c): undefined reference to `std::abs(double)'
collect2: ld returned 1 exit status
On the other hand, the following, for float and long double, is ok:
#include <cmath>
int main()
{
float num = 1.234;
std::abs(num);
long double num2 = 1.234;
std::abs(num2);
}
Ciao,
Paolo.