Subject: Re: g++ exception handling
To: None <current-users@NetBSD.ORG>
From: Julian Bean <jules@mailbox.co.uk>
List: current-users
Date: 09/23/1996 01:45:48
At 10:25 pm 22/9/96, I wrote:
>Has anyone had this working under NetBSD?
>
>I have a test project which compiles fine under gcc 2.7.2/SunOS 4 and also
>under gcc 2.7.2.1/Linux, but fails on link under NetBSD (various obvious
>exception handling utility routines are undefined).
>
>I will post detail bug report info when I have made sure I am at -current,
>but a full 'make' is going to take a while for my poor Mac LCIII....
>
>Meanwhile, i was just wondering if anyone definitely knew that it should
>work (or should not work). I note from /usr/doc/3RDPARTY that we are
>behind the FSF on libg++ - could this be it?
>
>Incidentally, is there a policy reason why we haven't submitted our gnu
>utils patches to the FSF, or is it a case of "too few people; not enough
>time"?
>
Following up to myself (tut,tut)...
I just rebuilt libg++ and libstdc++ with -current sources, and:
jelibean@elsie:/home/Deus/exceptiontest% cat main.cc 1:41:08
// Quick test of exception handling - work out gcc's -f options.
//
// 22/9/96 Works on Linux and SunOS 4.1.4
// Ben
//
#include<iostream.h>
main()
{
cout << "Hello World!" << endl;
try {
cout << "Testing..." << endl;
throw 1;
cout << "OK..." << endl;
}
catch (int i)
{
cout << "Caught integer exception " << i << "!" << endl;
}
cout << "End of exception handling test" << endl;
}
jelibean@elsie:/home/Deus/exceptiontest% make 1:41:13
g++ main.o -o test
main.o: Undefined symbol `___throw_type_match' referenced from text segment
main.o: Undefined symbol `___register_exceptions' referenced from text segment
main.o: Undefined symbol `___find_first_exception_table_match' referenced from t
ext segment
main.o: Undefined symbol `___unwind_function' referenced from text segment
*** Error code 1
Stop.
jelibean@elsie:/home/Deus/exceptiontest% 1:41:24
As the comments suggest, it works on SunOS and Linux - so what gives?
Jules
/----------------+-------------------------------+---------------------\
| Jelibean aka | jules@mailbox.co.uk | 6 Evelyn Road |
| Jules aka | | Richmond, Surrey |
| Julian Bean | | TW9 2TF *UK* |
+----------------+-------------------------------+---------------------+
| The 'net interprets censorship as damage, and routes around it. |
\----------------------------------------------------------------------/