r/C_Programming • u/8d8n4mbo28026ulk • Jul 30 '26
Memory layout primitives
https://napcakes.nekoweb.org/posts/blayout/
40
Upvotes
r/C_Programming • u/8d8n4mbo28026ulk • Jul 30 '26
View all comments
Show parent comment
2
u/skeeto Aug 04 '26
For the record this started with GCC 15, and it's listed in the changelog here:
https://gcc.gnu.org/gcc-15/changes.html#c
At the very least "Accessing byte arrays" and "Allow zero length operations on null pointers" are always well-defined starting in GCC 15 regardless of the
-std=flag. I knew this was true for the latter because I've already taken advantage of it, but I checked now and it applies to the former, too. Not surprising since both have already been well-defined in C++ for some time now.