Mail Archives: djgpp/2015/06/05/13:37:06
On 06/05/2015 10:08 AM, Eli Zaretskii (eliz AT gnu DOT org) wrote:
>> Date: Fri, 05 Jun 2015 08:01:11 +0300
>> From: "Andris Pavenis (andris DOT pavenis AT iki DOT fi)" <djgpp AT delorie DOT com>
>>
>> On 06/04/2015 11:22 PM, DJ Delorie wrote:
>>> Hmmm... either our headers need to be updated to newer ANSI versions
>>> (should we be exporting more symbols now?) or libstdc++ is making
>>> assumptions they're not telling us about (we'd need to test for those
>>> assumptions, not __cplusplus in general).
>>>
>> libstdc++ uses these macros unconditionally. So perhaps there is no other quick way as my earlier
>> patch for now.
>> Run some script (under Linux) to check whether there are other similar problems after patching errno.h
>>
>> Script compiled header files in similar way using -std=c++03 ,-c++11 and c++14. I ignored failures
>> for which also similar Linux compile fails (like c++11 required). Fedora 22 has gcc-5.1 as system
>> compiler so that fits nicely for testing.
>>
>> The results: no more unexpected failures after patching errno.h (some parts of libstdc++ depends on
>> other stuff and as result fails)
>>
>> So I'll applying patch unless there are objections
> Please apply it only conditioned by __cplusplus, and please make sure
> no errno macros that are NOT defined by the C++11 draft standard are
> defined by errno.h when both __cplusplus and __STRICT_ANSI__ are
> defined.
>
> IOW, we still want to be compatible to ANSI standards, even though
> they changed since v2.03.
>
> Thanks.
>
I committed change to trunk (not v2.05 branch yet). Detecting used C++ standard is bit tricky as
its support was already being developed earlier.
gcc versions 4.3 - 4.6 require special treatment
Andris
- Raw text -