Re: [boost] throw_exception rev. 44954 -> g++ warnings

In my opinion, this warning should be issued only if an attempt to call the non-virtual destructor of a type with virtual functions through a base class pointer is actually made, not simply because the possibility exists.
What's the disadvantage of adding the virtual destructors? It certainly is a huge disadvantage if -Wall cannot be used anymore. Until rev. 44954 everything we have compiled noise-free with -Wall (heaps of sources, many different gcc versions). I think the warning is useful. A library author cannot anticipate all situations in which the library may be used. If someone wants to derive from a class in a library and this triggers the smarter warning you propose for the first time, it is probably too late. If the library is part of the system headers it cannot be changed. The user is stuck. Ralf

On 5/2/08, Ralf W. Grosse-Kunstleve <rwgk@yahoo.com> wrote:
In my opinion, this warning should be issued only if an attempt to call the non-virtual destructor of a type with virtual functions through a base class pointer is actually made, not simply because the possibility exists.
What's the disadvantage of adding the virtual destructors? It certainly is a huge disadvantage if -Wall cannot be used anymore. Until rev. 44954 everything we have compiled noise-free with -Wall (heaps of sources, many different gcc versions).
I think the warning is useful. A library author cannot anticipate all situations in which the library may be used. If someone wants to derive from a class in a library and this triggers the smarter warning you propose for the first time, it is probably too late. If the library is part of the system headers it cannot be changed. The user is stuck.
I don't want to turn this into an argument; I only asked if there is an official Boost policy on the subject. Is there a requirement that boost compiles with -Wall without warnings on all compilers? Emil Dotchevski Reverge Studios, Inc. http://www.revergestudios.com/reblog/index.php?n=ReCode
participants (2)
-
Emil Dotchevski
-
Ralf W. Grosse-Kunstleve