Making memcpy(NULL, NULL, 0) well-defined

· Red Hat · Dec. 11, 2024, 7:36 a.m.
Summary
This blog post discusses the acceptance of N3322 for C2y, which removes undefined behavior from certain zero-length operations using NULL pointers in the C programming language, making operations like memcpy(NULL, NULL, 0) well-defined. It explains the implications for compiler optimizations and constants in functions, as well as the discussion and opposition faced during its proposal, ultimately leading to the recommendation for retroactive application of the change.
AUTHOR
Sponsored
Zulip logo Zulip
Organized team chat for people who take work seriously. Topic-based threading keeps conversations focused.
Try Zulip
Become a sponsor →
BLOG POST FEATURED ON

Add this plugin to your blog