News for hackers. Stuff that matters.
Re:Modern C++ for C Programmers: part 5 by stephencanon on Wednesday July 25, 2018 @12:11PM (#17610357)
From what I can see, the example you list there is just a missed optimization in the C compilers you tested. It's absolutely allowed, and clang trunk is happy to do it in C-mode, for example.
Re:Modern C++ for C Programmers: part 5 by petters on Wednesday July 25, 2018 @12:55PM (#17610760)
There could be some more fundamental differences due to the requirement that different objects require different pointers that prevent some optimizations.