Help on gcc

Rupert Wood me@rupey.net
Wed Feb 6 00:41:00 GMT 2002


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.



More information about the Gcc mailing list