in reply to
Re: $1 not "freezing" in an addition
in thread $1 not "freezing" in an addition
What happens? You might expect that you'd get output like this:
The example you gave has nothing to do with operand evaluation order and everything to do with operator precedence. Your code is equivalent to print(foo(+bar(), "\n"));, for which operand evaluation order *is* defined.
If you had used print foo() + bar(), "\n"; (or added the empty prototype, as you mentioned), then you would be relying on undefined operand evaluation order, yet it will give you the following on all machines:
foo just happened
bar just happened