This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/20710] g++ should warn when hiding non-virtual method in base class
- From: "loose at astron dot nl" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 1 Nov 2010 12:54:28 +0000
- Subject: [Bug c++/20710] g++ should warn when hiding non-virtual method in base class
- Auto-submitted: auto-generated
- References: <bug-20710-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20710
--- Comment #6 from loose at astron dot nl 2010-11-01 12:54:25 UTC ---
OK, fair enough.
However, I reported this "bug", because I would like GCC to produce a warning
when hiding a non-virtual method in *existing* code; an option similar to
-Woverloaded-virtual.
New code could of course be written, using either C0x attributes or GCC
attributes. But that won't solve the issue for C98-compliant code.
I agree that it's preferable to remove duplicate bugs. However, I'm not sure
the bugs you mention are real duplicates, because at least some of them
explicitly refer to overriding (virtual) functions, whereas I'm referring to
overloading (non-virtual) functions.