[Bug c/61317] ones complement fails when using increment(++) into an array

2014-05-26 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61317 --- Comment #7 from Jonathan Wakely --- Undefined behaviour does not mean you get a compiler error.

[Bug c/61317] ones complement fails when using increment(++) into an array

2014-05-26 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61317 Marek Polacek changed: What|Removed |Added CC||mpolacek at gcc dot gnu.org --- Comment

[Bug c/61317] ones complement fails when using increment(++) into an array

2014-05-26 Thread richard at rjriley dot info
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61317 --- Comment #5 from Richard Riley --- (In reply to Jonathan Wakely from comment #4) > http://c-faq.com/expr/seqpoints.html If that is the case, shouldn't a[i] = i++ and such statements be flagged as a compiler error?

[Bug c/61317] ones complement fails when using increment(++) into an array

2014-05-26 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61317 --- Comment #4 from Jonathan Wakely --- http://c-faq.com/expr/seqpoints.html

[Bug c/61317] ones complement fails when using increment(++) into an array

2014-05-26 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61317 --- Comment #3 from Andrew Pinski --- (In reply to Richard Riley from comment #2) > "When postfix ++ is applied to an lvalue the result is the value of the > object referred to by the lvalue. After the result is noted, the object is > incremente

[Bug c/61317] ones complement fails when using increment(++) into an array

2014-05-26 Thread richard at rjriley dot info
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61317 --- Comment #2 from Richard Riley --- "When postfix ++ is applied to an lvalue the result is the value of the object referred to by the lvalue. After the result is noted, the object is incremented in the same manner as for the prefix ++ operator

[Bug c/61317] ones complement fails when using increment(++) into an array

2014-05-26 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61317 Andrew Pinski changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---