This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: patch for -Wno-long-long and early GNAT compilers
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- To: dewar at gnat dot com
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 19 Mar 02 05:20:02 EST
- Subject: Re: patch for -Wno-long-long and early GNAT compilers
Note incidentally that the entire kerfuffle here comes NOT from Ada code,
but from C code, you were using a broken C compiler.
We don't know that's correct. The setjmp is in Ada code and the longjmp
is in C code. Either could be miscompiled.
Or perhaps the problem might be that GCC changed the way the builtin
setjmp/longjmp was implemented on x86 and the setjmp (in Ada code) is
being compiled with one version while the longjmp (in C code) is being
compiled by a different one.
Indeed, the success of that test program strongly suggests this is the
problem here. So it may well be that I was wrong in this case: you
can't compile the Ada code with a 2.8.1-based GCC and the C code with
a 2.95-based GCC and the reason is that those two backends handle the
builtin setjmp/longjmp incompatibly.
Note that I'm not saying this *is* the case, since I'm not aware of any
incompatibility in setjmp/longjmp in GCC, but it's conceivable there is
(having to do, for example, with exactly what FP is presumed to point to)
and if there *were*, it would precisely explain what Zack saw.