On Wed, 16 Feb 2005, Morten Welinder wrote:
>
> The evaluation of constant expressions is pretty solidly tied between the
> target platform and the host platform.
Integers are perfectly defined by the word-size. Nobody sane cares about
anything else than normal 2s-complement.
> For floating point, if you care, there are practical differences that it
> is going to be really hard to get rid of. Your x86 chip's long double
> isn't going to emulate the sparc's long double very well. It's 80-bit
> vs. 128-bit. To even get to compile-time switchability you are looking
> at floating-point emulation.
I'm very much against the idea of even trying. Somebody else can if they
care, but I won't merge it into my tree. It's a total waste of compiler
time, imnsho, and you absolutely cannot do it "correctly" anyway. Even
trying just shows how misguided you are.
Anybody who cares about the precision difference of compile-time vs
run-time would also care about things like rounding modes, which are
_dynamic_, for christ sake. Ie you have two and exactly two options:
- do no FP constants at _all_ at compile-time
- do a best-effort that you say up-front is not going to be the same as
the run-time one because of issues like dynamic rounding etc.
Notice: in neither case is it at all interesting to have SW FP emulation
in the compiler.
Yeah, yeah, some FP people will disagree. FP people are a damn
disagreeable lot, and I just don't care.
Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html