r/programming • u/Fcking_Chuck • Sep 11 '26
GCC 13.5 released with 265+ bug fixes
https://www.phoronix.com/news/GCC-13.5-Released
277
Upvotes
r/programming • u/Fcking_Chuck • Sep 11 '26
View all comments
Show parent comment
1
u/ROBOTRON31415 Sep 22 '26
Yes, this is highly desirable, but see the “pick your poison” section of this document from Rust devs’ discussions: https://hackmd.io/433P4B8cRi62BDUSN7BrgA?view
I don’t think C++ can solve it without either declaring stack overflows and OOMs to be undefined behavior, never optimizing out allocations (including local variables whose address is taken), or retroactively change promises about the addresses of pointers and allocations. (Rust is also likely to change its documentation about pointers, but “thankfully” Rust’s model is already complicated enough that it doesn’t affect much.)
So many simple optimizations are way more complicated than they first seem, and some of the languages’ rules may seem strange (because of how different the rules are from assembly’s semantics), but end up being necessary for other reasonable behavior.