Jonathan Wakely <redi at gcc dot> changed:

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

--- Comment #5 from Jonathan Wakely <redi at gcc dot> ---
(In reply to Lars Hamrén from comment #0)
> Suggestions: either remove the warning in these cases (when the problem is
> in the standard library), or add virtual destructors to standard library
> classes.

I think this bug is simply INVALID.

The warning is correct that you're deriving from a class without a virtual
destructor, the fact the class is from the standard library doesn't change
that. (Bug 56879 suggests limiting the warning to cases that matter, and Bug   
  16166 suggests there should be separate options for the various warnings
controlled by -Weffc++, which would help here, but still wouldn't change the
fact that deriving publicly from std::list is potentially bad).

Giving std::list a virtual destructor is absolutely out of the question.

Reply via email to