https://gcc.gnu.org/bugzilla/show_bug.cgi?id=4898
Eric Gallager <egallager at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |egallager at gcc dot gnu.org --- Comment #3 from Eric Gallager <egallager at gcc dot gnu.org> --- (In reply to luc.maisonobe from comment #0) > C++ allows to specify exceptions in the function declaration > but do not enforces it. When lots of classes and methods are > involved, maintaining up-to-date specifications is very > difficult, and every missed exception create runtime > problems (unexpected exception -> abort -> core dumped). For > the moment the lack of support tools prevents developers > from using these specifications effectively. > > It would be very helpful to have a switch on the compiler > to get warnings if a function do not declare the exceptions > that can be thrown by itself and its callee and that are > either not caught or that are rethrown. This could be an > extension to the existing -Weffc++ flag. > Which item from the Effective C++ book says to do this? (I don't actually own the book myself...) > As an example, one can look at Java that enforces the proper > declarations, this is nice. > > Release: > gcc-3.0 > > Environment: > All