GCC compiles the code below without any error: //---------------------------------- class A { protected: virtual void foo() const = 0; };
// Defining pure virtual functions should not be allowed. void A::foo() const { } //---------------------------------- -- Summary: GCC allows defining pure virtual functions Product: gcc Version: 4.1.3 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: yuriry at gmail dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35772