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

Because the current behavior of some compiler optimizations is that instead of returning unspecified values, it can assume that the code is unreachable (undefined behavior) and simply eliminate a bunch of normal, correct code that precedes reading unitialized storage.

Guaranteed immediate trapping might be difficult on some platforms, but a specification that allows to return an unspecified value or trap immediately - that can be done anywhere.



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

Search: