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

Florian Weimer fweimer@redhat.com
Mon Jun 13 07:24:00 GMT 2016


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.

As long as the projects are in separate source code repositories, there 
will be significant friction.  That's why I said we should merge them 
eventually (in the sense that we build their DSOs from a common source 
code base).

Florian



More information about the Libc-alpha mailing list