This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/60401] stdlib.h does not provide abs(long) overload
- From: "vogt at linux dot vnet.ibm.com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 21 Jan 2016 10:53:13 +0000
- Subject: [Bug libstdc++/60401] stdlib.h does not provide abs(long) overload
- Auto-submitted: auto-generated
- References: <bug-60401-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60401
--- Comment #13 from Dominik Vogt <vogt at linux dot vnet.ibm.com> ---
I'm running into problems testing the latest Gcc with the latest Glibc. The
test program is just
#include <math.h>
It's a bit difficult to provide the propert args to g++ to make it use the
replacement Glibc after its own headers but before the system Glibc. This
should do it:
$ g++ --sysroot ~/src/git/glibc/install -std=c++11 x.C
However, this results in errors with isnan and isinf:
-- snip --
In file included from .../git/gcc/install/include/c++/6.0.0/math.h:36:0,
from x.C:1:
.../gcc/install/include/c++/6.0.0/cmath:614:11: error: â::isinfâ has not been
declared
using ::isinf;
^~~~~
.../gcc/install/include/c++/6.0.0/cmath:638:11: error: â::isnanâ has not been
declared
using ::isnan;
^~~~~
-- snip --
With -v Gcc prints this include dir search list which looks fine to me:
-- snip --
ignoring nonexistent directory ".../glibc/install/usr/local/include"
ignoring nonexistent directory
".../gcc/install/lib/gcc/s390x-ibm-linux-gnu/6.0.0/../../../../s390x-ibm-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
.../gcc/install/lib/gcc/s390x-ibm-linux-gnu/6.0.0/../../../../include/c++/6.0.0
.../gcc/install/lib/gcc/s390x-ibm-linux-gnu/6.0.0/../../../../include/c++/6.0.0/s390x-ibm-linux-gnu
.../gcc/install/lib/gcc/s390x-ibm-linux-gnu/6.0.0/../../../../include/c++/6.0.0/backward
.../gcc/install/lib/gcc/s390x-ibm-linux-gnu/6.0.0/include
.../gcc/install/include
.../gcc/install/lib/gcc/s390x-ibm-linux-gnu/6.0.0/include-fixed
.../glibc/install/usr/include
End of search list.
-- snip --
Not sure whether this is a Gcc issue, a Glibc issue or just bad arguments to
g++.