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]
Other format: [Raw text]

Re: 3 new fails with builtin patch


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.


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