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]
Other format: [Raw text]

[Bug c++/25826] "pure virtual" destructors accepted by GCC, but cause link failure



------- Comment #1 from pinskia at gcc dot gnu dot org  2006-01-17 19:27 -------
You still need to declare A::~A().

That is what the following passage from that doc means:

Of course, any derived class' destructor must call the base class' destructor,
and so the destructor must still be defined (even if it's empty):

    // file b.cpp
    B::~B() { /* possibly empty */ }
If this definition were not supplied, you could still derive classes from B but
they could never be instantiated, which isn't particularly useful.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25826


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