This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/17920] add __attribute__((reimpl)) as a replacement for the (optional) virtual keyword for reimplementations of virtual functions
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 21 Jun 2011 16:02:17 +0000
- Subject: [Bug c++/17920] add __attribute__((reimpl)) as a replacement for the (optional) virtual keyword for reimplementations of virtual functions
- Auto-submitted: auto-generated
- References: <bug-17920-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17920
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.7.0
--- Comment #14 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-06-21 16:00:11 UTC ---
G++ 4.7 supports C++0x explicit override control, so the example can be changed
to:
struct A { virtual void foo() const; };
struct B : public A { void foo() override; };
And you get:
final.cc:2:28: error: 'void B::foo()' marked override, but does not override