Jason Merrill <ja...@redhat.com> writes: > On 06/01/2015 08:13 AM, Rainer Orth wrote: >> Jason Merrill <ja...@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?
sure: it's extern double atof(const char *); which is inside #if __cplusplus >= 199711L namespace std { #endif #ifdef __cplusplus extern "C" { #endif Isn't this about global vs. std namespace? Rainer -- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University