[Bug c/59264] Incorrect order of execution on increament/decrement operator

2013-11-24 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59264 --- Comment #6 from Eric Botcazou --- > But it works correctly in Turbo C and Borland C compiler why not in gcc Well, the point is precisely that all executions, Turbo C, Borland C or GCC, are equally correct, since the code has undefined behavio

[Bug c/59264] Incorrect order of execution on increament/decrement operator

2013-11-24 Thread smaheshs41 at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59264 --- Comment #5 from Mahesh S --- [Bug c/59264] Incorrect order of execution on increament/decrement operator But it works correctly in Turbo C and Borland C compiler why not in gcc On Sat, Nov 23, 2013 at 11:23 PM, ebotcazou at gcc dot gnu.org

[Bug c/59264] Incorrect order of execution on increament/decrement operator

2013-11-23 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59264 Eric Botcazou changed: What|Removed |Added CC||ebotcazou at gcc dot gnu.org --- Comment

[Bug c/59264] Incorrect order of execution on increament/decrement operator

2013-11-23 Thread smaheshs41 at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59264 --- Comment #3 from Mahesh S --- but it gets executed correctly for 1st condition why not for 2nd and 3rd On Sat, Nov 23, 2013 at 10:36 PM, redi at gcc dot gnu.org < gcc-bugzi...@gcc.gnu.org> wrote: > http://gcc.gnu.org/bugzilla/show_bug.cgi?id

[Bug c/59264] Incorrect order of execution on increament/decrement operator

2013-11-23 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59264 Jonathan Wakely changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug c/59264] Incorrect order of execution on increament/decrement operator

2013-11-23 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59264 --- Comment #1 from Jonathan Wakely --- Your code has undefined behaviour because it modifies the same variables more than once between sequence points.