This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/49679] Increment/decrement operator (++/--) not working as expected
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 8 Jul 2011 18:37:57 +0000
- Subject: [Bug c++/49679] Increment/decrement operator (++/--) not working as expected
- Auto-submitted: auto-generated
- References: <bug-49679-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49679
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-07-08 18:37:41 UTC ---
(In reply to comment #3)
> a and b must be the same.
No, it's undefined behaviour. Anything can happen.
http://blog.llvm.org/2011/05/what-every-c-programmer-should-know.html