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++.

Reply via email to