This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/31397] Useful compiler warning missing (virtual functions in derived classes used without 'virtual')
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Jul 2009 11:59:54 -0000
- Subject: [Bug c++/31397] Useful compiler warning missing (virtual functions in derived classes used without 'virtual')
- References: <bug-31397-14335@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #7 from rguenth at gcc dot gnu dot org 2009-07-13 11:59 -------
Your example is overriding A::f, not overloading it. Overloading would be
int f(int x, int y);
do you want a warning for that as well?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31397