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, mark at codesourcery dot com
- Date: Sat, 30 Mar 2002 12:53:02 +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
>
A little bit more of analysis. Consider:
namespace std
{
inline double
abs(double __x)
{ return __builtin_fabs(__x); }
}
int main()
{
double num = 1.234;
std::abs(num);
}
/tmp/ccKJFSrV.o: In function `main':
/tmp/ccKJFSrV.o(.text+0x2c): undefined reference to `std::abs(double)'
collect2: ld returned 1 exit status
OTOH:
namespace std
{
double
abs(double __x)
{ return __builtin_fabs(__x); }
}
int main()
{
double num = 1.234;
std::abs(num);
}
This is Ok! As is the first one if compiled -O. Therefore, it looks like
the problem mentioned in
http://gcc.gnu.org/ml/libstdc++/2002-03/msg00460.html about inline
declarations is still there.
Ciao, Paolo.