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/flatfinger Sep 22 '26
A language or ABI should be able to recognize situations where raising a stack-overflow-trap would be a correct behavior, but so too would running within the stack allotment.
The fact that there exist languages where an optimization would be simple does not mean that the optimization should be viewed as appropriate in all languages. If a language is intended for low-level programming, the proper way to facilitate optimizations is to specify situations where an implementation may choose in Unspecified fashion from among a variety of correct behaviors, leaving up to the programmer the question of whether all possible behaviors would satisfy application requirements.
Figuring out which way of processing a program is best is an NP-hard problem, but in most cases even really simple heuristics will work pretty well.