From: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
To: Jason Merrill <jason@redhat.com>
Cc: gcc-patches List <gcc-patches@gcc.gnu.org>
Subject: Re: C++ PATCH to handling of exception specs in system headers
Date: Mon, 01 Jun 2015 15:34:00 -0000 [thread overview]
Message-ID: <ydda8wjwigm.fsf@CeBiTec.Uni-Bielefeld.DE> (raw)
In-Reply-To: <556C7321.2040008@redhat.com> (Jason Merrill's message of "Mon, 01 Jun 2015 10:58:41 -0400")
Jason Merrill <jason@redhat.com> writes:
> 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?
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
next prev parent reply other threads:[~2015-06-01 15:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-27 20:59 Jason Merrill
2015-06-01 12:13 ` Rainer Orth
2015-06-01 14:58 ` Jason Merrill
2015-06-01 15:34 ` Rainer Orth [this message]
2015-06-01 17:05 ` Jason Merrill
2015-06-02 14:19 ` Rainer Orth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ydda8wjwigm.fsf@CeBiTec.Uni-Bielefeld.DE \
--to=ro@cebitec.uni-bielefeld.de \
--cc=gcc-patches@gcc.gnu.org \
--cc=jason@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).