← Back to context

Comment by ahoka

17 hours ago

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.