3 ms·
I do not think C's UB is damaging. As I said, you instruct the compiler to insert a trap and then it is not unsafe. Example: https://godbolt.org/z/Kvrrx19Pa ht
by uecker 3y ago
I do not think C's UB is damaging. As I said, you instruct the compiler to insert a trap and then it is not unsafe.
Example: https://godbolt.org/z/Kvrrx19Pa https://godbolt.org/z/Kvrrx19Pa
The UB in the spec is exactly what makes safe use possible without enforcing it everywhere, which is not feasible for C.