[Bug c++/78010] --Wsuggest-override reports a redundant warning on a 'final' method

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Apr 25 20:30:00 GMT 2017


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

--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Arnaud Desitter from comment #3)
> Interesting reference. Note that "virtual + final" can be useful even if the
> core guidelines discourage its use.
> 
> struct A {
>   virtual void f() final;
> };
> struct B : A {
>    // "void f()" cannot be defined
> };

What would be the point in that?


More information about the Gcc-bugs mailing list