Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

And the compiler is allowed to remove the check, *even if not optimizing*. -O0 doesn't guarantee it'll be kept.

In practice compilers sould be considered to follow Murphy's Law: Undefined Behavior will work perfectly fine when on a developer's machine or when observed by any support or QA staff, but will occasionally cause intermittent problems on production machines when observed by users or during demonstrations to executives.



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

Search: