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

The third one is just (x=x+1), because the middle bit is just always false and can be ignored.

  • source
  • hideshow 2 child comments
  • [–] 6 points 2 years ago (1 child)

    What if int overflows? Is it still false?

  • source
  • parent
  • hideshow 2 child comments
  • [–] 11 points 2 years ago (1 child)

    Still false, thanks to compiler optimizations. Remember that integer overflow is UB. (unless you're using unsigned int or a programming language which strictly defines integer overflow, possibly as an error)

    P.S.: Assuming this is C/C++

  • source
  • parent
  • hideshow 2 child comments