[Bug c/60413] extra precision not properly removed on assignment of return value
desrt at desrt dot ca
gcc-bugzilla@gcc.gnu.org
Tue Mar 4 16:24:00 GMT 2014
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60413
--- Comment #2 from Ryan Lortie <desrt at desrt dot ca> ---
Why is this violation of standards treated in a special way?
Quoting from gcc's manpage:
-ffast-math
Sets -fno-math-errno, -funsafe-math-optimizations,
-ffinite-math-only, -fno-rounding-math, -fno-signaling-nans
and -fcx-limited-range.
This option causes the preprocessor macro "__FAST_MATH__"
to be defined.
This option is not turned on by any -O option besides
-Ofast since it can result in incorrect output for programs
that depend on an exact implementation of IEEE or ISO
rules/specifications for math functions. It may, however,
yield faster code for programs that do not require the
guarantees of these specifications.
It seems that the logic about "since it can result in incorrect output for
programs that depend on an exact implementation of IEEE or ISO
rules/specifications" should be equally applied here.
ie: default should be to follow the standards, and maybe have 'fast' mode
enabled if the user gives -ffast-math.
More information about the Gcc-bugs
mailing list