From: Jonathan Wakely <jwakely@redhat.com>
To: Marek Polacek <polacek@redhat.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] c++: Add new warning options for C++ language mismatches
Date: Wed, 19 May 2021 17:59:34 +0100 [thread overview]
Message-ID: <YKVD9o3A2Vm/y/sU@redhat.com> (raw)
In-Reply-To: <YKVCpWFDkUpE1hGl@redhat.com>
On 19/05/21 12:53 -0400, Marek Polacek wrote:
>On Wed, May 19, 2021 at 05:39:24PM +0100, Jonathan Wakely via Gcc-patches wrote:
>> Jakub pointed out I'd forgotten the spaces before the opening parens
>> for function calls. The attached patch should fix all those, with no
>> other changes.
>>
>> Tested x86_64-linux. OK for trunk?
>
>Nice, this is cool.
>
>> --- a/gcc/c-family/c.opt
>> +++ b/gcc/c-family/c.opt
>> @@ -431,6 +431,22 @@ Wc++20-compat
>> C++ ObjC++ Var(warn_cxx20_compat) Warning LangEnabledBy(C++ ObjC++,Wall)
>> Warn about C++ constructs whose meaning differs between ISO C++ 2017 and ISO C++ 2020.
>>
>> +Wc++11-extensions
>> +C++ ObjC++ Var(warn_cxx11_extensions) Warning LangEnabledBy(C++ ObjC++,Wall) Init(1)
>> +Warn about C++11 constructs in code compiled with an older standard.
>> +
>> +Wc++14-extensions
>> +C++ ObjC++ Var(warn_cxx14_extensions) Warning LangEnabledBy(C++ ObjC++,Wall) Init(1)
>> +Warn about C++14 constructs in code compiled with an older standard.
>> +
>> +Wc++17-extensions
>> +C++ ObjC++ Var(warn_cxx17_extensions) Warning LangEnabledBy(C++ ObjC++,Wall) Init(1)
>> +Warn about C++17 constructs in code compiled with an older standard.
>> +
>> +Wc++20-extensions
>> +C++ ObjC++ Var(warn_cxx20_extensions) Warning LangEnabledBy(C++ ObjC++,Wall) Init(1)
>> +Warn about C++20 constructs in code compiled with an older standard.
>> +
>
>So these are enabled by -Wall but also turned on by default? Let's choose one
>and then drop either the Init(1) or the LangEnabledBy(C++ ObjC++,Wall) part?
Ah, good point. I mostly just cargo-cult what I see in that file (is
the format documented somewhere?)
I think to preserve the current behaviour (using these constructs in
an unsupported dialect warns by default) we want them to be Init(1)
but not in -Wall. Or we could change the behaviour, and include them
in -Wall and not Init(1), but then people who don't use -Wall (aka
idiots and beginners) would not get the warnings.
Any preference?
next prev parent reply other threads:[~2021-05-19 16:59 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-19 16:32 Jonathan Wakely
2021-05-19 16:39 ` Jonathan Wakely
2021-05-19 16:46 ` Jonathan Wakely
2021-05-19 17:26 ` Jason Merrill
2021-05-19 19:55 ` Jonathan Wakely
2021-05-19 20:05 ` Jonathan Wakely
2021-05-19 20:08 ` Jason Merrill
2021-05-19 22:52 ` Jonathan Wakely
2021-05-20 20:05 ` Jonathan Wakely
2021-05-21 16:10 ` Jason Merrill
2021-05-19 20:05 ` Jason Merrill
2021-05-20 12:56 ` Jonathan Wakely
2021-05-20 16:34 ` Jason Merrill
2021-05-20 19:49 ` Jonathan Wakely
2021-05-20 17:25 ` Martin Sebor
2021-05-20 19:32 ` Jonathan Wakely
2021-05-19 16:53 ` Marek Polacek
2021-05-19 16:59 ` Jonathan Wakely [this message]
2021-05-19 17:09 ` Marek Polacek
2022-03-29 9:27 ` options, '-Wc++[...]-extensions': Remove undefined one-argument 'LangEnabledBy' option properties (was: [PATCH] c++: Add new warning options for C++ language mismatches) Thomas Schwinge
2022-03-29 11:34 ` Jonathan Wakely
2022-03-29 18:13 ` Joseph Myers
2021-05-19 17:51 ` [PATCH] c++: Add new warning options for C++ language mismatches Martin Sebor
2021-05-19 18:03 ` Marek Polacek
2021-05-19 18:35 ` Jonathan Wakely
2021-05-19 18:41 ` Marek Polacek
2021-05-19 23:05 ` Jonathan Wakely
2021-05-19 23:12 ` Jonathan Wakely
2021-05-19 16:40 ` Eric Gallager
2021-05-19 16:50 ` Jonathan Wakely
2021-05-19 16:56 ` Jonathan Wakely
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=YKVD9o3A2Vm/y/sU@redhat.com \
--to=jwakely@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=polacek@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).