Warnings for unhandled c++ exceptions?
Chris Lattner
sabre@nondot.org
Mon Feb 3 19:39:00 GMT 2003
> My primary goals for this warning were solely: bug tracking and
> consistency verification. Nothing more.
...
> In a large enough software project, you probably won't be calling many of
> these out-of-project methods (and such calls are suspect anyways), so the
> warnings are still useful in the context you describe.
Remember that one of the major problems with C++ exception specifications
is that they basically can't work with generic code. For example, if you
had a throw clause on your copy ctor, you couldn't use an std::vector of
your class without getting a warning (because the code calling the copy
ctor doesn't have an exception specification).
Note that this is just an example, even if you don't have throw'ing copy
ctors it can come up in other cases as well... With any amount of generic
code used, I can't imagine how this would be practical at all.
-Chris
--
http://llvm.cs.uiuc.edu/
http://www.nondot.org/~sabre/Projects/
More information about the Gcc
mailing list