This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/33248] The execution gives wrong results when compiled with mingw32-gcc 3.4.2
- From: "alduc1 at free dot fr" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 Aug 2007 15:22:43 -0000
- Subject: [Bug c/33248] The execution gives wrong results when compiled with mingw32-gcc 3.4.2
- References: <bug-33248-15041@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from alduc1 at free dot fr 2007-08-30 15:22 -------
I do not think it is the same bug 11751.
For example:
*p++ = *p + 1.0;
*p++ = *p + 1.0;
works. But
*p++ = (float) floor((double) *p + 0.5);
*p++ = (float) floor((double) *p + 0.5);
does not work (with float). It is not only the ++ operator that cause the
problem.
Why when it is compiled with gcc 3.2.3 there is no problem ?
Why the equivalent code
*p = (float) floor((double) *p + 0.5);
p++;
*p = (float) floor((double) *p + 0.5);
p++;
works ?
I do not understand "no sequence point between *p++ and *p" ?
--
alduc1 at free dot fr changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |UNCONFIRMED
Resolution|DUPLICATE |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33248