https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113792

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to John David Anglin from comment #0)
> stdlib.h is fixed on this target.  The #include_next pulled stdlib.h
> from /usr/include instead of ./prev-gcc/include-fixed/stdlib.h.

Why did that happen?

For my systems, the include search list is:

ignoring nonexistent directory
"/home/jwakely/gcc/14/lib/gcc/x86_64-pc-linux-gnu/14.0.1/../../../../x86_64-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /home/jwakely/src/benchmark/include/

/home/jwakely/gcc/14/lib/gcc/x86_64-pc-linux-gnu/14.0.1/../../../../include/c++/14.0.1

/home/jwakely/gcc/14/lib/gcc/x86_64-pc-linux-gnu/14.0.1/../../../../include/c++/14.0.1/x86_64-pc-linux-gnu

/home/jwakely/gcc/14/lib/gcc/x86_64-pc-linux-gnu/14.0.1/../../../../include/c++/14.0.1/backward
 /home/jwakely/gcc/14/lib/gcc/x86_64-pc-linux-gnu/14.0.1/include
 /usr/local/include
 /home/jwakely/gcc/14/include
 /home/jwakely/gcc/14/lib/gcc/x86_64-pc-linux-gnu/14.0.1/include-fixed
 /usr/include
End of search list.

Why is /usr/include coming before the include-fixed dir? That seems wrong.

I'm extremely reluctant to fiddle with the (historically fragile) ordering
between the <cxxx> headers and <xxx.h> headers without understanding exactly
what's happening here, and why.

Reply via email to