you are viewing a single comment's thread
view the rest of the comments
[–] 12 points 2 years ago (1 child)

I'm fairly certain that last one is UB in C. The result of an assignment operator is not an lvalue, and even if it were it's UB (at least in C99) to modify the stored value of an object more than once between two adjacent sequence points. It might work in C++, though.

  • source
  • hideshow 2 child comments