This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: Help on gcc
- From: "Rupert Wood" <me at rupey dot net>
- To: "'James Dressler'" <jamesmdr at hotmail dot com>
- Cc: <gcc at gcc dot gnu dot org>
- Date: Wed, 6 Feb 2002 08:14:00 -0000
- Subject: RE: Help on gcc
James Dressler wrote:
> try {
> *p = 0;
> } catch(...) {
> printf("captured");
> }
:
> does not work, never prints "captured". OS is SunOs 5.6 on
> Sparc, gcc is gcc version 2.95.1 19990816 (release)
>
> Any suggestion to solve the problem?
The POSIX world doesn't work like this; this is a 'signal' not a C++
exception. You're only likely to catch them like that on Windows.
On Solaris, try:
man -s 3HEAD signal
but you're approaching the realms of needing a good book. You probably
want to start with SIGSEGV.