This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH] Prevent GCC 6 <cstdlib> from including /usr/include/stdlib.h
- From: Roland McGrath <roland at hack dot frob dot com>
- To: Florian Weimer <fweimer at redhat dot com>
- Cc: Andreas Schwab <schwab at suse dot de>, libc-alpha at sourceware dot org
- Date: Fri, 10 Jun 2016 15:07:26 -0700 (PDT)
- Subject: Re: [PATCH] Prevent GCC 6 <cstdlib> from including /usr/include/stdlib.h
- Authentication-results: sourceware.org; auth=none
- References: <20160608150824 dot C6B3A4012D197 at oldenburg dot str dot redhat dot com> <mvma8iv66k7 dot fsf at hawking dot suse dot de> <66891e52-9d31-9c8e-02f8-ee068d041184 at redhat dot com>
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.