[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Bug rtl-optimization/323] optimized code gives strange floating point results




------- Comment #131 from vincent at vinc17 dot org  2009-07-22 17:33 -------
(In reply to comment #130)
> #define axiom_order(a,b)  !(a < b && b < a) 
> #define axiom_eq(a)       a == a 
> #define third             ((double)atoi("1")/atoi("3"))
[...]

> in C99 (+TC1,TC2,TC3) different precision is not allowed

It is allowed, except for...

> 5.1.2.3 p12:
>   ... In particular, casts and assignments are required to perform their
> specified conversion

But a division is not a cast, nor an assignment.

> 5.2.4.2.2 p8:
>   Except for assignment and cast (which remove all extra range and precision),
> the values 8 of operations with floating operands and values subject to the
> usual arithmetic conversions and of floating constants are evaluated to a
> format whose range and precision may be greater than required by the type.

A greater precision is OK for division, in particular.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=323

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


Reply to: