[Bug c/56399] Adding int to float generates incorrect results

johnfoxrep at yahoo dot com gcc-bugzilla@gcc.gnu.org
Tue Feb 19 17:43:00 GMT 2013


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

johnfoxrep at yahoo dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|INVALID                     |
           Severity|blocker                     |enhancement

--- Comment #2 from johnfoxrep at yahoo dot com 2013-02-19 17:43:09 UTC ---
This seems to be dangerous. I would expect at least 32-bit int precision from
floating point variables. MS C++ treats float as double. Why should GCC not do
the same? It would prevent many hard to find bugs in existing programs where I
have encountered this bug.



More information about the Gcc-bugs mailing list