This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/13719] 0.2*5.0>1.0 even with -O0, missing fldl probably
- From: "guilhem at mysql dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Jan 2004 19:54:28 -0000
- Subject: [Bug c++/13719] 0.2*5.0>1.0 even with -O0, missing fldl probably
- References: <20040117142439.13719.guilhem@mysql.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From guilhem at mysql dot com 2004-01-17 19:54 -------
Thanks for your answer. However, the 2nd example I gave in the bug report
#include <stdlib.h>
#include <stdio.h>
main()
{
double e = atof("0.2")*atof("5.0");
if (e>1.0)
printf("0.2 * 5.0 > 1.0 (ERROR)\n");
else
printf("0.2 * 5.0 <= 1.0 (OK)\n");
}
does "store the multiplication into a temporary variable" (quoting your words)
('e'), but it certainly does not "work as I am expecting" when compiled with -O1.
Could you please explain to me?
--
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |UNCONFIRMED
Resolution|INVALID |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13719