www.delorie.com/archives/browse.cgi   search  
Mail Archives: pgcc/1999/03/19/09:28:08

Sender: knusto01 AT d1o213 DOT telia DOT com
Message-ID: <36F25F69.89FE5D00@mr.telia.no>
Date: Fri, 19 Mar 1999 15:30:01 +0100
From: Knut Arne Storeide <knusto01 AT mr DOT telia DOT no>
X-Mailer: Mozilla 4.5 [en] (X11; I; Linux 2.2.1-ac3 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: pgcc AT delorie DOT com
Subject: Re: Exceptions & core dumps ...
References: <99031723063300 DOT 00611 AT localhost DOT localdomain>
Reply-To: pgcc AT delorie DOT com

Gerald Gutierrez wrote:
> 
> Hi all. I'm getting core dumps with the following code below using RH5.2 and
> pgcc-1.1.1. It seems to work fine with egcs-1.1.2. I'm unable to try it with
> egcs-1.1.1 because I don't have it.
> 
> Is this a pgcc bug, is it just my installation or am I doing something wrong?
> 
> Thanks.
> 
> #include <stdio.h>
> 
> class Alpha {
> public:
>     Alpha (void) throw (int) { printf ("Throwing..\n"); throw 1234; }
>     ~Alpha (void) throw () { }
> };
> 
> int main (int ac, char* av[])
> {
>     try {
>         Alpha conn;
>     } catch (int v) {
>         printf ("Caught\n");
>     }
>     return 0;
> }

I had the same kind of problem. With me it went away when I added
-fexceptions to the compile options.

Good luck
Knut A Storeide

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019