[PATCH] Prevent GCC 6 <cstdlib> from including /usr/include/stdlib.h

Roland McGrath roland@hack.frob.com
Fri Jun 10 22:07:00 GMT 2016


In what way is it not a bug for cstdlib to do #include_next <stdlib.h>?
The only purpose I understand for using #include_next is when a header
named foo does #include_next <foo>.  If it really is somehow proper for
cstdlib to be demanding that it get a stdlib.h from an include directory
later in the include path than is the directory containing that cstdlib,
then the proper fix is to change our C++ compilations to put the standard
C++ include directories earlier in the path than the libc source
directories that are performing the function of system C include directories.



More information about the Libc-alpha mailing list