delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/12/03/08:18:30

From: Christopher Croughton <crough45 AT amc DOT de>
Message-Id: <97Dec3.151828gmt+0100.17026@internet01.amc.de>
Subject: Re: DJGPP, GCC, and throw, try, catch
To: ao950 AT FreeNet DOT Carleton DOT CA, djgpp AT delorie DOT com
Date: Wed, 3 Dec 1997 14:16:25 +0100
Mime-Version: 1.0

ao950 AT FreeNet DOT Carleton DOT CA (Paul Derbyshire) wrote:

> Does GCC/DJGPP support C++ exceptions; that is to say, the throw statement
> and the try...catch block? If so, in what ways if any does it deviate from
> the standard?

Yeas and no <g>.  The gcc compiler has serious problems with C++ exceptions,
often resulting in compiler crashes (not runtime, this is compiler internal 
errors and if you're really lucky SEGVs).  And if the compiler doesn't fall 
over then the linker often does.

I've heard that these are supposed to be fixed in the fabled version 2.8,
possibly.  I haven't seen it and I don't have time to chase down 'snapshots' 
which may have even more bugs.

However, if you use a limited number of exceptions then they do indeed 
compile and work.  It seems to be only if you use a lot then it falls 
over...

> (I searched the FAQ from contents to index using Internet Exploder's "Find
> (on this page)..." under such items as "exception", "throw", and "C++" and
> failed to find one single reference to C++ exceptions in the entire
> monolithic document. 

I don't think this question is "Frequently Asked" enough <g>...

Oh, my recommendation: use exceptions and when you find the faults throw them
at the GCC bug list.  It might inspire someone to do something about them if
enough people complain (it might even get them to acknowledge such reports;
however, at that they are no worse than the commercial compiler maintainers).
If you don't get the faults then just take your good fortune...

Chris C

- Raw text -


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