This is the mail archive of the
mailing list for the GCC project.
RE: Minor exception bug with unexpected
- To: "egcs-bugs at cygnus dot com" <egcs-bugs at cygnus dot com>
- Subject: RE: Minor exception bug with unexpected
- From: Kaz Kylheku <kaz at cafe dot net>
- Date: Thu, 19 Mar 1998 12:14:56 -0800
On Thursday, March 19, 1998 7:25 AM, Alexandre Oliva
> ak writes:
> > The appended example dumps core in __check_eh_spec. Although that
> > is legal in CD2 [except.special says "The unexpected() function shall
> > not return"], it is still not very nice to the user. The patch
> > makes unexpected() call terminate() in this case.
> I'd rather call abort() instead of terminate(). Calling terminate()
> might cause yet more unexpected results (unavoidable pun, sorry :-)
I agree. First of all, if by ``user'' we mean the end-user of the program,
then the user should never see any kind of program failure.
If by ``user'' we mean the programmer, then dumping core from an
unhandled or unexpected exception is perfectly legitimate.
The program has a serious internal error, not unlike a division
by zero or invalid pointer dereference.