https://gcc.gnu.org/bugzilla/show_bug.cgi?id=4898

--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Yes, but IMHO it would be a huge waste of time to add a ton of new machinery to
the compiler to check for "correct" usage of an obsolete feature. Most C++98
code didn't even use them, because they were not useful. Most code still using
them should never have used them in the first place, because they don't work
the way people think. C++ is not Java.

From the original rationale:

(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

That's a reason to avoid using them, not a reason to complicate the compiler.

> the moment the lack of support tools prevents developers
> from using these specifications effectively.

Even with tooling they can't be used effectively.

Reply via email to