From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 216C738582B9; Fri, 8 Jul 2022 06:11:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 216C738582B9 From: "sbergman at redhat dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/87729] Please include -Woverloaded-virtual in -Wall Date: Fri, 08 Jul 2022 06:11:18 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 8.2.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: sbergman at redhat dot com X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: jason at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jul 2022 06:11:19 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D87729 --- Comment #12 from Stephan Bergmann --- (In reply to CVS Commits from comment #11) > The master branch has been updated by Jason Merrill : >=20 > https://gcc.gnu.org/g:81bec060e31b6ef2feeb3046c6f13a207c6f698a >=20 > commit r13-1559-g81bec060e31b6ef2feeb3046c6f13a207c6f698a > Author: Jason Merrill > Date: Thu Jul 7 10:12:04 2022 -0400 >=20 > c++: -Woverloaded-virtual and dtors [PR87729] This still starts to produces spurious warnings for diamond inheritance: > $ cat test.cc > struct S1 { virtual void f(); }; > struct S2: S1 {}; > struct S3: S1 {}; > struct S4: S2, S3 { void f(); }; > $ g++ -Woverloaded-virtual -fsyntax-only test.cc > test.cc:1:26: warning: =E2=80=98virtual void S1::f()=E2=80=99 was hidden = [-Woverloaded-virtual=3D] > 1 | struct S1 { virtual void f(); }; > | ^ > test.cc:4:26: note: by =E2=80=98virtual void S4::f()=E2=80=99 > 4 | struct S4: S2, S3 { void f(); }; > | ^=