This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [Ada] Bootstrapping mainline GNAT fails
- From: Zack Weinberg <zack at codesourcery dot com>
- To: Robert Dewar <dewar at gnat dot com>
- Cc: gcc at gcc dot gnu dot org, kenner at vlsi1 dot ultra dot nyu dot edu
- Date: Mon, 18 Mar 2002 19:42:16 -0800
- Subject: Re: [Ada] Bootstrapping mainline GNAT fails
- References: <20020319032429.D528EF28F5@nile.gnat.com>
On Mon, Mar 18, 2002 at 10:24:29PM -0500, Robert Dewar wrote:
> <<Fix (1) and (2) will cease to be an issue. Lemme see if I can hack up
> Constant_Array_Ref to support string literals.
> >>
>
> Well (2) is most certainly an issue, 3.14p works fine for handling exceptions
> in general (it has gone through a test suite that is particularly thorough
> in this respect) so something is quite odd.
Since the problem didn't manifest with Richard's test program, I
imagine it's an extreme corner case, possibly with bad interactions
with the C library as well (there is some concern over whether glibc
2.2 works properly with 2.8.1-era GCC).
> Not sure what you mean here, exceptions are used extensively in the
> Ada compiler to handle error conditions, and there is certainly no
> guarantee that exceptions are not raised in compiling the compiler.
If exceptions are used only to signal fatal errors, then you could
avoid ever actually _throwing_ an exception; instead, the runtime
routines that normally cause exceptions to be thrown, would be swapped
out for custom versions that called fatal_error()... sort of like the
abort() macro in the other language front ends.
Then, even if the bootstrap compiler generates buggy code for
exception handling, stage1 gnat1 will not fail.
On the other hand, if exceptions are used for non-fatal errors too,
then this won't work, unless you wanted to eliminate all such uses
(which would be a lot more effort).
It's not immediately obvious to me which of these is the case.
zw