public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Manuel López-Ibáñez" <lopezibanez@gmail.com>
To: Paolo Bonzini <bonzini@gnu.org>
Cc: Gcc Patch List <gcc-patches@gcc.gnu.org>,
	"Joseph S. Myers" <joseph@codesourcery.com>
Subject: Re: [PATCH v2] cpp/c: Add -Wexpansion-to-defined
Date: Wed, 10 Aug 2016 15:25:00 -0000	[thread overview]
Message-ID: <CAESRpQC3dG8tAuSM5=++ge=sBwWbUa4gKOqgqdARUyorWPkhGA@mail.gmail.com> (raw)
In-Reply-To: <a1492930-23b4-d288-181d-d4e37c7bd746@gnu.org>

On 10 August 2016 at 15:44, Paolo Bonzini <bonzini@gnu.org> wrote:
>
>
> On 10/08/2016 16:42, Manuel López-Ibáñez wrote:
>> > > My only fear is that people not using -Wpedantic nor -pedantic-errors
>> > > expect that GNU extensions work. This is a GNU extension that defines
>> > > something that is undefined according to ISO. Enabling the warning
>> > > with -Wextra is just annoying those people who may not care about
>> > > other compilers.
>> >
>> > I think this warning falls in the same category as
>> > -Wshift-negative-value.  (In fact I dislike -Wshift-negative-value a
>> > lot, and would put that one under -Wpedantic only).
>>
>> It is not the same category. One is compile-time UB and the other is
>> runtime UB. See:
>> https://gcc.gnu.org/ml/gcc-patches/2015-04/msg01551.html
>> and https://gcc.gnu.org/ml/gcc-patches/2015-04/msg01529.html
>
> Right---what I meant is it's the same kind of "annoying for people who
> expect that GNU extensions work" warning.

Oh, I agree. I'm just mentioning what the current definition/behavior
is (and documenting it here:
https://gcc.gnu.org/wiki/DiagnosticsGuidelines FWIW), not what I think
should be.

Perhaps we need something like -Wextra-pedantic, for things that are
undefined by ISO C but defined by GNU. Thus, they would not trigger
pedwarns and no error with -pedantic-errors.

Or we need to split -Wpedantic into -Wpedantic-pedwarns and
-Wpedantic-nopedwarns (with better names). This way -pedantic-errors
would be equivalent to -Werror=pedantic-pedwarns +
-Werror=pedwarns-not-controlled-by-pedantic.

i find -pedantic-errors too out of place with the rest of -W* options.

Manuel.

  reply	other threads:[~2016-08-10 15:25 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-10 10:06 Paolo Bonzini
2016-08-10 11:32 ` Manuel López-Ibáñez
2016-08-10 11:53   ` Joseph Myers
2016-08-10 12:06   ` Paolo Bonzini
2016-08-10 14:43     ` Manuel López-Ibáñez
2016-08-10 14:45       ` Paolo Bonzini
2016-08-10 15:25         ` Manuel López-Ibáñez [this message]
2016-08-10 15:29           ` Paolo Bonzini
2016-08-10 15:33             ` Joseph Myers
2016-08-10 15:51               ` Paolo Bonzini
2016-08-10 15:58                 ` Joseph Myers
2016-08-10 16:01                   ` Paolo Bonzini
2016-08-11  3:02 ` Sandra Loosemore

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='CAESRpQC3dG8tAuSM5=++ge=sBwWbUa4gKOqgqdARUyorWPkhGA@mail.gmail.com' \
    --to=lopezibanez@gmail.com \
    --cc=bonzini@gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=joseph@codesourcery.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).