[Bug c++/35772] New: GCC allows defining pure virtual functions

yuriry at gmail dot com gcc-bugzilla@gcc.gnu.org
Sun Mar 30 22:18:00 GMT 2008


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



More information about the Gcc-bugs mailing list