Mail Archives: djgpp/1997/12/03/08:18:30
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 -