Bradley Lucier wrote:

> If -ffinite-math-only is specified, then producing NaN instead of inf
> should be allowed.

Agreed.  After all, -finite-math says:

     Allow optimizations for floating-point arithmetic that assume that
     arguments and results are not NaNs or +-Infs.

Since the compiler can assume the output isn't a NaN or an Inf, it can
freely switch one and the other.

> If -fno-finite-math-only is specified, then the generated code should
> "do the right thing" if an argument or result is inf or NaN.

Also agreed.

-- 
Mark Mitchell
CodeSourcery
[EMAIL PROTECTED]
(650) 331-3385 x713

Reply via email to