defining a pure virtual
Benoit Hudson
bh@techhouse.brown.edu
Thu Aug 31 13:24:00 GMT 2000
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)
More information about the Gcc-bugs
mailing list