[Bug c/14384] Invalid use of extra precision floating-point with -O0 optimization
wilson at specifixinc dot com
gcc-bugzilla@gcc.gnu.org
Wed Mar 3 18:57:00 GMT 2004
------- Additional Comments From wilson at specifixinc dot com 2004-03-03 18:57 -------
Subject: Re: New: Invalid use of extra precision floating-point
with -O0 optimization
anz at obs-nice dot fr wrote:
> Arithmetic involving a float and a "lesser" type should be done in float in C89,
> at least when optimization is turned off.
This is false. K&R C required float operations to be performed in
double. C89 allows float operations to be performed as float, but does
not require it.
In my ANSI C 89 manual, this is section 3.2.1.5 Usual Arithmetic
Conversions, last sentence
"The values of floating operands and of the results of floating
expressions may be represented in greater precision and range than that
required by the type; the types are not changed thereby."
This gives the compiler the option of using float/double/long double for
operations on float types. This is unfortunately necessary, because
some hardware, the classic x86 FPU in particular, does not have a full
set of operations. It only has one, which for linux, is long double by
default.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14384
More information about the Gcc-bugs
mailing list