Hacker News new | past | comments | ask | show | jobs | submit login

By definition UB cannot be safe.



Something can be UB according to the standard, but defined (and safe) according to a particular implementation. Lots of stuff is UB according to the C or C++ standard but does something sensible in gcc and/or clang.


The definition given by the C standard allows for safe undefined behavior.


this depends on your choice of definition for "safe"




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: