Re: options, '-Wc++[...]-extensions': Remove undefined one-argument 'LangEnabledBy' option properties (was: [PATCH] c++: Add new warning options for C++ language mismatches)

2022-03-29 Thread Joseph Myers
On Tue, 29 Mar 2022, Thomas Schwinge wrote: > | --- gcc/c-family/c.opt > | +++ gcc/c-family/c.opt > | [...] > | +Wc++11-extensions > | +C++ ObjC++ Var(warn_cxx11_extensions) Warning LangEnabledBy(C++ ObjC++) > Init(1) > | +Warn about C++11 constructs in code compiled with an older standard. > | +

Re: options, '-Wc++[...]-extensions': Remove undefined one-argument 'LangEnabledBy' option properties (was: [PATCH] c++: Add new warning options for C++ language mismatches)

2022-03-29 Thread Jonathan Wakely via Gcc-patches
On Tue, 29 Mar 2022 at 10:28, Thomas Schwinge wrote: > > Hi! > > On 2021-05-19T13:09:29-0400, Marek Polacek via Gcc-patches > wrote: > > On Wed, May 19, 2021 at 05:59:34PM +0100, Jonathan Wakely wrote: > >> On 19/05/21 12:53 -0400, Marek Polacek wrote: > >> > On Wed, May 19, 2021 at 05:39:24PM +0

options, '-Wc++[...]-extensions': Remove undefined one-argument 'LangEnabledBy' option properties (was: [PATCH] c++: Add new warning options for C++ language mismatches)

2022-03-29 Thread Thomas Schwinge
Hi! On 2021-05-19T13:09:29-0400, Marek Polacek via Gcc-patches wrote: > On Wed, May 19, 2021 at 05:59:34PM +0100, Jonathan Wakely wrote: >> 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: >> > > --- a/gcc/c

Re: [PATCH] c++: Add new warning options for C++ language mismatches

2021-05-21 Thread Jason Merrill via Gcc-patches
On 5/20/21 4:05 PM, Jonathan Wakely wrote: On 19/05/21 23:52 +0100, Jonathan Wakely wrote: On 19/05/21 16:08 -0400, Jason Merrill wrote: On 5/19/21 4:05 PM, Jonathan Wakely wrote: Oh, also we have https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93769 which points out a problem with the current wo

Re: [PATCH] c++: Add new warning options for C++ language mismatches

2021-05-20 Thread Jonathan Wakely via Gcc-patches
On 19/05/21 23:52 +0100, Jonathan Wakely wrote: On 19/05/21 16:08 -0400, Jason Merrill wrote: On 5/19/21 4:05 PM, Jonathan Wakely wrote: Oh, also we have https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93769 which points out a problem with the current wording. Not a very important one, but still .

Re: [PATCH] c++: Add new warning options for C++ language mismatches

2021-05-20 Thread Jonathan Wakely via Gcc-patches
On 20/05/21 12:34 -0400, Jason Merrill wrote: On 5/20/21 8:56 AM, Jonathan Wakely wrote: On 19/05/21 16:05 -0400, Jason Merrill wrote: On 5/19/21 3:55 PM, Jonathan Wakely wrote: On 19/05/21 13:26 -0400, Jason Merrill wrote: On 5/19/21 12:46 PM, Jonathan Wakely wrote: On 19/05/21 17:39 +0100,

Re: [PATCH] c++: Add new warning options for C++ language mismatches

2021-05-20 Thread Jonathan Wakely via Gcc-patches
On 20/05/21 11:25 -0600, Martin Sebor wrote: On 5/20/21 6:56 AM, Jonathan Wakely wrote: On 19/05/21 16:05 -0400, Jason Merrill wrote: On 5/19/21 3:55 PM, Jonathan Wakely wrote: On 19/05/21 13:26 -0400, Jason Merrill wrote: On 5/19/21 12:46 PM, Jonathan Wakely wrote: On 19/05/21 17:39 +0100,

Re: [PATCH] c++: Add new warning options for C++ language mismatches

2021-05-20 Thread Martin Sebor via Gcc-patches
On 5/20/21 6:56 AM, Jonathan Wakely wrote: On 19/05/21 16:05 -0400, Jason Merrill wrote: On 5/19/21 3:55 PM, Jonathan Wakely wrote: On 19/05/21 13:26 -0400, Jason Merrill wrote: On 5/19/21 12:46 PM, Jonathan Wakely wrote: On 19/05/21 17:39 +0100, Jonathan Wakely wrote: Jakub pointed out I'd

Re: [PATCH] c++: Add new warning options for C++ language mismatches

2021-05-20 Thread Jason Merrill via Gcc-patches
On 5/20/21 8:56 AM, Jonathan Wakely wrote: On 19/05/21 16:05 -0400, Jason Merrill wrote: On 5/19/21 3:55 PM, Jonathan Wakely wrote: On 19/05/21 13:26 -0400, Jason Merrill wrote: On 5/19/21 12:46 PM, Jonathan Wakely wrote: On 19/05/21 17:39 +0100, Jonathan Wakely wrote: Jakub pointed out I'd

Re: [PATCH] c++: Add new warning options for C++ language mismatches

2021-05-20 Thread Jonathan Wakely via Gcc-patches
On 19/05/21 16:05 -0400, Jason Merrill wrote: On 5/19/21 3:55 PM, Jonathan Wakely wrote: On 19/05/21 13:26 -0400, Jason Merrill wrote: On 5/19/21 12:46 PM, Jonathan Wakely wrote: On 19/05/21 17:39 +0100, Jonathan Wakely wrote: Jakub pointed out I'd forgotten the spaces before the opening pare

Re: [PATCH] c++: Add new warning options for C++ language mismatches

2021-05-19 Thread Jonathan Wakely via Gcc-patches
On 19/05/21 11:51 -0600, Martin Sebor wrote: On 5/19/21 10:39 AM, 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?

Re: [PATCH] c++: Add new warning options for C++ language mismatches

2021-05-19 Thread Jonathan Wakely via Gcc-patches
On 19/05/21 11:51 -0600, Martin Sebor wrote: On 5/19/21 10:39 AM, 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?

Re: [PATCH] c++: Add new warning options for C++ language mismatches

2021-05-19 Thread Jonathan Wakely via Gcc-patches
On 19/05/21 16:08 -0400, Jason Merrill wrote: On 5/19/21 4:05 PM, Jonathan Wakely wrote: On 19/05/21 20:55 +0100, Jonathan Wakely wrote: On 19/05/21 13:26 -0400, Jason Merrill wrote: On 5/19/21 12:46 PM, Jonathan Wakely wrote: On 19/05/21 17:39 +0100, Jonathan Wakely wrote: Jakub pointed out

Re: [PATCH] c++: Add new warning options for C++ language mismatches

2021-05-19 Thread Jason Merrill via Gcc-patches
On 5/19/21 4:05 PM, Jonathan Wakely wrote: On 19/05/21 20:55 +0100, Jonathan Wakely wrote: On 19/05/21 13:26 -0400, Jason Merrill wrote: On 5/19/21 12:46 PM, Jonathan Wakely wrote: On 19/05/21 17:39 +0100, Jonathan Wakely wrote: Jakub pointed out I'd forgotten the spaces before the opening pa

Re: [PATCH] c++: Add new warning options for C++ language mismatches

2021-05-19 Thread Jason Merrill via Gcc-patches
On 5/19/21 3:55 PM, Jonathan Wakely wrote: On 19/05/21 13:26 -0400, Jason Merrill wrote: On 5/19/21 12:46 PM, Jonathan Wakely wrote: On 19/05/21 17:39 +0100, Jonathan Wakely wrote: Jakub pointed out I'd forgotten the spaces before the opening parens for function calls. The attached patch shoul

Re: [PATCH] c++: Add new warning options for C++ language mismatches

2021-05-19 Thread Jonathan Wakely via Gcc-patches
On 19/05/21 20:55 +0100, Jonathan Wakely wrote: On 19/05/21 13:26 -0400, Jason Merrill wrote: On 5/19/21 12:46 PM, Jonathan Wakely wrote: On 19/05/21 17:39 +0100, Jonathan Wakely wrote: Jakub pointed out I'd forgotten the spaces before the opening parens for function calls. The attached patch

Re: [PATCH] c++: Add new warning options for C++ language mismatches

2021-05-19 Thread Jonathan Wakely via Gcc-patches
On 19/05/21 13:26 -0400, Jason Merrill wrote: On 5/19/21 12:46 PM, Jonathan Wakely wrote: On 19/05/21 17:39 +0100, Jonathan Wakely 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. Tes

Re: [PATCH] c++: Add new warning options for C++ language mismatches

2021-05-19 Thread Marek Polacek via Gcc-patches
On Wed, May 19, 2021 at 07:35:20PM +0100, Jonathan Wakely wrote: > On 19/05/21 14:03 -0400, Marek Polacek wrote: > > On Wed, May 19, 2021 at 11:51:54AM -0600, Martin Sebor via Gcc-patches > > wrote: > > > On 5/19/21 10:39 AM, Jonathan Wakely via Gcc-patches wrote: > > > > Jakub pointed out I'd for

Re: [PATCH] c++: Add new warning options for C++ language mismatches

2021-05-19 Thread Jonathan Wakely via Gcc-patches
On 19/05/21 14:03 -0400, Marek Polacek wrote: On Wed, May 19, 2021 at 11:51:54AM -0600, Martin Sebor via Gcc-patches wrote: On 5/19/21 10:39 AM, Jonathan Wakely via Gcc-patches wrote: > Jakub pointed out I'd forgotten the spaces before the opening parens > for function calls. The attached patch

Re: [PATCH] c++: Add new warning options for C++ language mismatches

2021-05-19 Thread Marek Polacek via Gcc-patches
On Wed, May 19, 2021 at 11:51:54AM -0600, Martin Sebor via Gcc-patches wrote: > On 5/19/21 10:39 AM, 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 cha

Re: [PATCH] c++: Add new warning options for C++ language mismatches

2021-05-19 Thread Martin Sebor via Gcc-patches
On 5/19/21 10:39 AM, 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? Looks good to me, it just needs an update to t

Re: [PATCH] c++: Add new warning options for C++ language mismatches

2021-05-19 Thread Jason Merrill via Gcc-patches
On 5/19/21 12:46 PM, Jonathan Wakely wrote: On 19/05/21 17:39 +0100, Jonathan Wakely 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? Jakub also po

Re: [PATCH] c++: Add new warning options for C++ language mismatches

2021-05-19 Thread Marek Polacek via Gcc-patches
On Wed, May 19, 2021 at 05:59:34PM +0100, Jonathan Wakely wrote: > 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 ca

Re: [PATCH] c++: Add new warning options for C++ language mismatches

2021-05-19 Thread Jonathan Wakely via Gcc-patches
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-l

Re: [PATCH] c++: Add new warning options for C++ language mismatches

2021-05-19 Thread Jonathan Wakely via Gcc-patches
On 19/05/21 17:50 +0100, Jonathan Wakely wrote: On 19/05/21 12:40 -0400, Eric Gallager wrote: Thank you for doing this! One thing I'm wondering about, is that I'm pretty sure clang also allows at least some of these to be used with plain C as well, for example for things like the old use of "aut

Re: [PATCH] c++: Add new warning options for C++ language mismatches

2021-05-19 Thread Marek Polacek via Gcc-patches
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

Re: [PATCH] c++: Add new warning options for C++ language mismatches

2021-05-19 Thread Jonathan Wakely via Gcc-patches
On 19/05/21 12:40 -0400, Eric Gallager wrote: Thank you for doing this! One thing I'm wondering about, is that I'm pretty sure clang also allows at least some of these to be used with plain C as well, for example for things like the old use of "auto" in C conflicting with the newer C++11 meaning

Re: [PATCH] c++: Add new warning options for C++ language mismatches

2021-05-19 Thread Jonathan Wakely via Gcc-patches
On 19/05/21 17:39 +0100, Jonathan Wakely 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? Jakub also pointed out we already have some similar diagno

Re: [PATCH] c++: Add new warning options for C++ language mismatches

2021-05-19 Thread Eric Gallager via Gcc-patches
On Wed, May 19, 2021 at 12:33 PM Jonathan Wakely via Gcc-patches wrote: > > This adds new warning flags, enabled by default: -Wc++11-extensions, > -Wc++14-extensions, -Wc++17-extensions, and -Wc++20-extensions. The > names of the flags are copied from Clang, which already has similar > options. >

Re: [PATCH] c++: Add new warning options for C++ language mismatches

2021-05-19 Thread Jonathan Wakely via Gcc-patches
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? commit a7dc19cdc0c5d3762bb90d12ebd82a05d0013246 Author: Jonathan Wakely Date: Wed May 19 17:37:00 2021

[PATCH] c++: Add new warning options for C++ language mismatches

2021-05-19 Thread Jonathan Wakely via Gcc-patches
This adds new warning flags, enabled by default: -Wc++11-extensions, -Wc++14-extensions, -Wc++17-extensions, and -Wc++20-extensions. The names of the flags are copied from Clang, which already has similar options. No new diagnostics are added, but the new OPT_Wxxx variables are used to control exi