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.
do compilers generally optimize this away on -O3, or do you just accept the performance hit in exchange for prettier code?