This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/16403] Floating-point assignment to int is inconsistent
- From: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Jul 2004 13:06:18 -0000
- Subject: [Bug c/16403] Floating-point assignment to int is inconsistent
- References: <20040707082702.16403.yuvalk@mainsoft.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From bangerth at dealii dot org 2004-07-07 13:06 -------
Those are the realities of floating point arithmetic. Assignment of
doubles to ints are dangerous, unless you use round() or similar.
This could be a duplicate of PR 323, but the code in any case is not
safe. There is no bug in gcc.
W.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16403