This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/21718] New: real.c rounding not perfect
- From: "neil at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 May 2005 13:03:13 -0000
- Subject: [Bug c/21718] New: real.c rounding not perfect
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
When compiled with -Wall,
int foo (void) { if (9007199254740991.4999999999999999999999999999999995 ==
9007199254740991.5) return 1;}
does not complain about a missing return statement, showing that GCC is folding
the comparison to true. However, the LHS should round down.
With one less 9 GCC gets it correct.
I'm not convinced it's worthwhile to get perfect rounding, but Joseph wanted me
to file a report.
--
Summary: real.c rounding not perfect
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Severity: enhancement
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: neil at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21718