Re:ABI Mistakes
by colour on Saturday May 08, 2021 @06:06PM
(#27091193)
"Well, what’s wrong with that? Surely we can just do what we did in the days of dumb compilers and pass structures by pointer. Unfortunately, that doesn’t work anymore; compilers are smart now, and they don’t like it when objects alias. "
What does that even mean? Does gcc cry after I make it translate code with pointers, I simply don't get it.
[ Parent
| on HN ]
"Doesn't work anymore" is a hyperbole. Aliasing can prevent optimizations, like in the code example immediately after that paragraph where the value of `x` needs to be loaded from memory to be returned.
See also https://en.wikipedia.org/wiki/Aliasing_(computing)#Conflicts...