News for hackers. Stuff that matters.
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.
Re:Compiler Explorer by BeeOnRope on Thursday August 06, 2020 @01:27AM (#24068347)
Well we could check with godbolt:

https://godbolt.org/z/1reM4s

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.

https://godbolt.org/z/3oGc3P