This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re(2): GNU C++ compiler enhancement rqst
rth@redhat.com,Internet writes:
>On Fri, Mar 16, 2001 at 11:01:30PM +0000, Andrew Marlow wrote:
>> We have said that doSomethingElse will only throw exceptions
>> of type E but it calls a routine that might throw any
>> exception, which will be propaged, violating the throw list.
>
>No it won't be propagated. It'll be caught and verified
>by doSomethingElse, which will call std::unexpected.
You're right. But the point is that
std::unexpected will be called. So in
this case we have a runtime failure rather
than a compile-time failure. The enhancement
would make this a compile time failure.