C++ PATCH to handling of exception specs in system headers

Jason Merrill jason@redhat.com
Mon Jun 1 14:58:00 GMT 2015


On 06/01/2015 08:13 AM, Rainer Orth wrote:
> Jason Merrill <jason@redhat.com> writes:
>
>> -pedantic shouldn't change something from OK into an error, but it was
>> doing so for redeclaration of a declaration from a system header with a
>> mismatched exception specification.  And whether we are strict about things
>> in system headers should be controlled by -Wsystem-headers.
>>
>> Tested x86_64-pc-linux-gnu, applying to trunk.
>
> The new g++.dg/warn/Wsystem-headers1.C test FAILs on Solaris 10 and 11:
>
> FAIL: g++.dg/warn/Wsystem-headers1.C  -std=c++98 (test for excess errors)
>
> /vol/gcc/src/hg/trunk/local/gcc/testsuite/g++.dg/warn/Wsystem-headers1.C:3:33: error: 'double atof(const char*)' conflicts with a previous declaration
> In file included from /usr/include/stdlib.h:17:0,
>                   from /vol/gcc/src/hg/trunk/local/gcc/testsuite/g++.dg/warn/Wsystem-headers1.C:1:
> /var/gcc/regression/trunk/10-gcc/build/gcc/include-fixed/iso/stdlib_iso.h:119:15: note: previous declaration 'double std::atof(const char*)'

It's not clear what the conflict is.  Can you quote the declaration from 
stdlib_iso.h?

Jason




More information about the Gcc-patches mailing list