[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 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] New: ones complement fails when using increment(++) into an array

2014-05-26 Thread richard at rjriley dot info
Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: richard at rjriley dot info Created attachment 32855 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=32855&action=edit Test program and results When taking the one's complement