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: Andreas Schwab <schwab at suse dot de>
- To: Florian Weimer <fweimer at redhat dot com>
- Cc: Roland McGrath <roland at hack dot frob dot com>, libc-alpha at sourceware dot org
- Date: Mon, 13 Jun 2016 09:35:37 +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> <66891e52-9d31-9c8e-02f8-ee068d041184 at redhat dot com> <20160610220726 dot 98FE62C39F7 at topped-with-meat dot com> <e7755ec7-4df0-b085-d7d7-9d820fc74370 at redhat dot com> <mvminxd4kt4 dot fsf at hawking dot suse dot de> <58354a4f-f796-43d9-158e-702f5c6036d0 at redhat dot com>
Florian Weimer <fweimer@redhat.com> writes:
> On 06/13/2016 09:20 AM, Andreas Schwab wrote:
>> Florian Weimer <fweimer@redhat.com> writes:
>>
>>> On 06/11/2016 12:07 AM, Roland McGrath wrote:
>>>> In what way is it not a bug for cstdlib to do #include_next <stdlib.h>?
>>>
>>> They are part of the implement in the same way we are. Why would it be a
>>> bug?
>>
>> Because <cstdlib> and <stdlib.h> are unrelated headers belonging to
>> different projects. Their place in the include order needs to be
>> controlled independently.
>
> They aren't unrelated, the C++ run-time is a superset of the C run-time. C
> headers have to be usable from C++, and C++ headers describing glibc
> functionality need to be compatible with glibc.
That doesn't make them related. They are located in independent include
directories, thus you cannot assume a fixed order.
Andreas.
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."