|
From: | Mathieu Malaterre |
Subject: | Re: Warning in g++ vs gcc |
Date: | Fri, 29 Jul 2005 17:42:59 -0400 |
User-agent: | Debian Thunderbird 1.0.2 (X11/20050602) |
Mathieu Malaterre wrote:
Hello,I must be missing something really simple but how does one work around this :$ cat demo.c int main() { int k = 375; double a = 3.75; k /= a; return 1; }
As someone from gnu.gcc.help pointed out I can reproduce funny results with: $ cat demo.c int main() { int k = 370; double a = 3.70; k /= a; return 1; } depending on compile option: gcc -O0 demo.c returns 99 gcc -O1 demo.c returns 100 Someone to refresh my memory ? Thanks Mathieu
[Prev in Thread] | Current Thread | [Next in Thread] |