This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Problem with exception handling


> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]