[Bug c++/65856] New: -Wsuggest-override shall not report a warning on final method

thomas.helfer at cea dot fr gcc-bugzilla@gcc.gnu.org
Thu Apr 23 08:37:00 GMT 2015


            Bug ID: 65856
           Summary: -Wsuggest-override shall not report a warning on final
           Product: gcc
           Version: 5.1.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: thomas.helfer at cea dot fr


first of all, as this is my first report, I wish to thank all gcc developpers
for their work.

I tried the -Wsuggest-override flag. I found that it suggests adding override
to methods marked final. I think that this shall not be as final methods are
already meant to override a method.

This is only a suggestion. Maybe something in the standard makes it logical to
mark a method as both override and final, but this would seem weird to my


‘virtual const char* tfel::math::InvalidTimeStepException::what() const’ can be
marked override [-Wsuggest-override]
       virtual const char* what() const noexcept final;

More information about the Gcc-bugs mailing list