HN2new | past | comments | ask | show | jobs | submitlogin

No, for the cases that involve undefined behavior, the results can differ arbitrarily depending on compiler settings, optimization settings, the presence of seemingly irrelevant code, or, in principle, the phase of the moon.

The behavior of any program that evaluates `i++ + ++i` is undefined. The solution is not to find out how it happens to behave in some circumstances. It's to find clearer code that expresses whatever the original intent was.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: