On Tue, Feb 13, 2024 at 03:41:53PM -0500, Jason Merrill wrote: > On 2/13/24 14:43, Marek Polacek wrote: > > On Tue, Feb 13, 2024 at 08:38:18PM +0100, Jakub Jelinek wrote: > > > On Tue, Feb 13, 2024 at 02:24:11PM -0500, Marek Polacek wrote: > > > > Sadly, I must admit this is looking like GCC 15 material. > > > > > > If deferred for GCC 15, can't we at least do some minimal > > > change and just guard the member pedwarn with cxx_dialect < something? > > > > I could do something like that, but... > > > > > Given that -Wextra-semi isn't on by default nor included in > > > -Wall -W, I think even accepting this for GCC 14 wouldn't be that > > > risky. > > > > ...I also don't think it's that risky but technically, it's not > > a regression I think. > > > Jason's decision. > > > > > > + /* If -Wextra-semi wasn't specified, warn only when -pedantic is in > > > + effect in C++11 and below. DR 1693 added "empty-declaration" to > > > the > > > + syntax for "member-declaration". */ > > > + else if (pedantic && cxx_dialect < cxx14) > > > > > > If it was a DR, did it apply just to C++14 or changed C++11 as well? > > > > It's got Status: C++14 so I thought that C++11/C++98 had not been > > adjusted. > > That's just the timeframe it was accepted in; below that it says "moved to > DR" which usually means it applies to earlier standards, whereas "accepted" > or "applied to WP" do not. > > For 14 let's go with the minimal change Jakub suggests.
Okay. Do we want to pedwarn about the extra ; here struct S { int a;; }; only in C++98 or C++11 too? Marek