This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Prevent GCC 6 <cstdlib> from including /usr/include/stdlib.h
- From: Florian Weimer <fweimer at redhat dot com>
- To: Andreas Schwab <schwab at suse dot de>
- Cc: libc-alpha at sourceware dot org
- Date: Wed, 8 Jun 2016 19:15:54 +0200
- 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>
On 06/08/2016 05:31 PM, Andreas Schwab wrote:
Why does it find stdlib.h in /usr/include?
The include search path ends in:
.
/usr/lib/gcc/x86_64-redhat-linux/6.1.1/../../../../include/c++/6.1.1
/usr/lib/gcc/x86_64-redhat-linux/6.1.1/../../../../include/c++/6.1.1/x86_64-redhat-linux
/usr/lib/gcc/x86_64-redhat-linux/6.1.1/../../../../include/c++/6.1.1/backward
/usr/lib/gcc/x86_64-redhat-linux/6.1.1/include
/usr/local/include
/usr/include
GCC finds
/usr/lib/gcc/x86_64-redhat-linux/6.1.1/../../../../include/c++/6.1.1/cstdlib,
and #include_next <stdlib.h> picks up the copy in /usr/include.
Does this answer your question?
Thanks,
Florian