Re:Compiler Explorer
by hackingthenews on Wednesday August 05, 2020 @11:02PM
(#24067755)
Clang/llvm also does heap ellision (removing unnecessary mallocs) while gcc didn't last time I checked. I think the llvm devs allows themselves to have a more practical understanding of the cpp standard.
[ Parent
| on HN ]
Well we could check with godbolt:
GCC seems to eliminate them since at least 4.7.1.
Re:Compiler Explorer
by hackingthenews on Thursday August 06, 2020 @12:04PM
(#24072227)
That's fair.
Here is another example where it eliminates since 5.1.