https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86350
martin <mscfd at gmx dot net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mscfd at gmx dot net --- Comment #5 from martin <mscfd at gmx dot net> --- @kargl: "Rather odd to need an option to get standard conforming behavior." I do not understand this sentence. From what you cited from the standard it is clear that it is not necessary to call function bar() from your example, but the compiler is allowed to do so. Hence evaluating bar() is definitely standard conformant. Not evaluating it is also standard conformant. This is not a nice situation allowed by the standard. But in my opinion, a compiler aiming for portability should definitely always call bar() if the standard allows this, even if it might mean a missed optimisation. If the programmer is keen on such optimisations, the code can easily be rewritten to take advantage of not calling bar if the first operand is zero.