This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/14417] output streams and post-increment operator have incorrect output.
- From: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Mar 2004 23:23:35 -0000
- Subject: [Bug c++/14417] output streams and post-increment operator have incorrect output.
- References: <20040303205908.14417.mcvick_e@iname.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From bangerth at dealii dot org 2004-03-03 23:23 -------
The standard says that the behavior of your program is undefined in this
case. Newer compilers are better at optimizing code, so they trip users
writing undefined code more often. It's not the compiler's fault if it
reorders code that the standard allows it to reorder.
W.
PS: To understand what's going on, read the entry on -Wsequence-point
in the manual.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14417