https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64870
--- Comment #6 from Conrad <conradsand.arma at gmail dot com> --- (In reply to Andrew Pinski from comment #5) > No, that is not how C++ defines it. As mentioned before C++ does not define > the order of the execution of the operands. I agree this is not how C++ defines it. At the same time, changing the order from left-to-right "just because we can" is not a good strategy either, especially for iostreams. > There is no wtf moments. This is not Java which has well defined behavior > :). Ha :-) I'd still like to see some concrete benchmarks to support re-ordering. Otherwise it can be argued that the re-ordering is actually counter productive, given its unintuitive behaviour. Given a choice between gcc and clang, I'd pick clang because it's simply better behaved. This is not to dismiss the great effort put into gcc, but user-friendliness is important.