This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

defining a pure virtual


I've just noticed that defining a pure virtual function works.  For
instance,

    struct A {
        virtual void f() = 0;
    };
    void A::f() { }

Gives neither warning nor error, even with -Wall; 
nm shows A::f() as being defined.

> gcc -v
Reading specs from /home/bhudson/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/specs
gcc version 2.95.2 19991024 (release)

(and also same compiler on sparc-sun-solaris2.6)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]