Skip to content- Sources: primary, discussion
- Summary: LWN reports that the C2y working draft removes 45 of roughly 100 instances of undefined behaviour. C23 already added a no-time-travel rule that stops compilers hoisting work above an operation that may be undefined. Pointer equality comparison stays defined by the standard and is still miscompiled by both Clang and GCC.
- Why it matters: Code that compares pointers for equality cannot rely on the standard defining that behaviour, because both Clang and GCC miscompile it today, which is the gap a C2y edition closing 45 undefined-behaviour cases still leaves for a C codebase to work around.