The C programming language faces controversy over undefined behavior (UB). N3322 aims to remove UB in specific cases involving null pointers and zero-length operations, enhancing code safety without harming performance. However, the proposal met opposition, especially concerning defining NULL – NULL as 0. Despite concerns about adding complexity for static analysis, voters overwhelmingly supported the change. Compiler implementations like LLVM must align with the new C standard, inspired by Rust developers’ comments. The N3322 proposal, steered by Aaron Ballman and influenced by David Stone’s feedback, highlights the ongoing evolution of C language standards.
https://developers.redhat.com/articles/2024/12/11/making-memcpynull-null-0-well-defined