This is the mail archive of the
mailing list for the GCC project.
-fstrict-fp-semantics (was Re: numerical instability and estimate-probability)
- From: Brad Lucier <lucier at math dot purdue dot edu>
- To: gcc at gcc dot gnu dot org
- Cc: lucier at math dot purdue dot edu (Brad Lucier), jh at suse dot cz, rth at cygnus dot com, mrs at windriver dot com
- Date: Thu, 15 Nov 2001 19:35:36 -0500 (EST)
- Subject: -fstrict-fp-semantics (was Re: numerical instability and estimate-probability)
OK, now the GCC developers themselves have gotten bitten on the ass (sorry,
Jan ;-) by the fact that gcc generates different FP code that gives different FP
results depending on what specific optimizations have been invoked.
It has been a principle forever that adding -g to the compiler options does
not change the code *one bit*.
Can we adopt an option, say -fstrict-fp-semantics, that means that fp
results are not changed *one bit* by any optimization?
That doesn't mean that the results aren't different if the host machines
are different. This is allowed even by two different IEEE 754 conforming
machines (at least if one of them is an x86 or 68K and the other is your
typical RISC platform).
But it does mean that implementing the principles elucidated by Toon Moene in
and by me in
are the only sane way to really fix this problem.
Toon says in
that the conclusion of his previous e-mail was that "this
would be useful to add to GCC, but no-one was stepping forward to do
the work." Now that this problem affects the very operation of GCC
itself, perhaps someone will want to fix it.