News for hackers. Stuff that matters.
Re:Single-Assignment C by voldacar on Thursday December 26, 2019 @11:19PM (#21889147)
> This leads to structs being passed by value

do compilers generally optimize this away on -O3, or do you just accept the performance hit in exchange for prettier code?

Re:Single-Assignment C by asymptotically2 on Friday December 27, 2019 @04:19AM (#21890148)
If it's a static method (or in an anonymous namespace in C++), it should get fixed at any optimisation level. However if it's a global method, you'll need to pass -flto to defer optimisations to link time to make it work.