https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87729

Stephan Bergmann <sbergman at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sbergman at redhat dot com

--- Comment #10 from Stephan Bergmann <sbergman at redhat dot com> ---
(In reply to CVS Commits from comment #8)
> The master branch has been updated by Jason Merrill <ja...@gcc.gnu.org>:
> 
> https://gcc.gnu.org/g:113844d68e94f4e9c0e946db351ba7d3d4a1335a
> 
> commit r13-1262-g113844d68e94f4e9c0e946db351ba7d3d4a1335a
> Author: Jason Merrill <ja...@redhat.com>
> Date:   Fri Jun 24 14:40:12 2022 -0400
> 
>     c++: Include -Woverloaded-virtual in -Wall [PR87729]

This started to cause spurious -Woverloaded-virtual= warnings now (first
reported at <https://gcc.gnu.org/pipermail/gcc-patches/2022-July/597670.html>
"Re: [pushed] c++: Include -Woverloaded-virtual in -Wall [PR87729]"):

> $ cat test.cc
> struct S1 {};
> struct S2: S1 { virtual ~S2(); };
> struct S3 { virtual ~S3(); };
> struct S4: S2, S3 { virtual ~S4(); };

> $ g++ -Woverloaded-virtual -fsyntax-only test.cc
> test.cc:3:21: warning: ‘virtual S3::~S3()’ was hidden [-Woverloaded-virtual=]
>     3 | struct S3 { virtual ~S3(); };
>       |                     ^
> test.cc:4:29: note:   by ‘virtual S4::~S4()’
>     4 | struct S4: S2, S3 { virtual ~S4(); };
>       |                             ^
> test.cc:3:21: warning: ‘virtual S3::~S3()’ was hidden [-Woverloaded-virtual=]
>     3 | struct S3 { virtual ~S3(); };
>       |                     ^
> test.cc:4:29: note:   by ‘virtual S4::~S4()’
>     4 | struct S4: S2, S3 { virtual ~S4(); };
>       |                             ^
> test.cc:3:21: warning: ‘virtual S3::~S3()’ was hidden [-Woverloaded-virtual=]
>     3 | struct S3 { virtual ~S3(); };
>       |                     ^
> test.cc:4:29: note:   by ‘virtual S4::~S4()’
>     4 | struct S4: S2, S3 { virtual ~S4(); };
>       |                             ^

Reply via email to