https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84695
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |enhancement --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Clang has -Winconsistent-missing-override which is turned on by default and provides the warning: <source>:8:7: warning: 'two' overrides a member function but is not marked 'override' [-Winconsistent-missing-override] int two(int) { return 102; } ^ <source>:4:15: note: overridden virtual function is here virtual int two(int) { return 2; } ^