This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Problem with exception handling
- To: andrew at amac dot com dot au
- Subject: Re: Problem with exception handling
- From: "Martin v. Loewis" <martin at mira dot isdn dot cs dot tu-berlin dot de>
- Date: Sun, 28 Feb 1999 19:15:29 +0100
- CC: egcs-bugs at cygnus dot com
- References: <36D7B717.F49492B9@amac.com.au>
> The code was compiled with g++ 2.8.1 and
> binutils 2.9.1.0.15 ( upgraded as a fix attempt ) -
g++ 2.8.1 is not really in scope of this list. I strongly encourage
you to upgrade to egcs 1.1.1.
> > ./x
> > trying: throwing a Fred; Aborted (core dumped)
My version of egcs refuses to compile your code, I get
b.cc: In function `void userCode()':
b.cc:10: implicit declaration of function `int rand(...)'
b.cc: In function `int main()':
b.cc:28: implicit declaration of function `int set_unexpected(...)'
After adding
#include <exception>
#include <cstdlib>
it compiles fine, and runs as expected.
Regards,
Martin