4 ms·
By definition UB cannot be safe.
by ahoka 2y ago
By definition UB cannot be safe.
- marssaxman 2y agothis depends on your choice of definition for "safe"
- Maxatar 2y agoThe definition given by the C standard allows for safe undefined behavior.
- School-Cotton 2y agoSomething 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.