This is the mail archive of the gcc@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]
Other format: [Raw text]

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.


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