12 ms·
Right! In fact I believe the above code invokes undefined behavior, because b may be accessed for a reason other than to determine its new value, without an int
by ridiculous_fish 13y ago
Right! In fact I believe the above code invokes undefined behavior, because b may be accessed for a reason other than to determine its new value, without an intervening sequence point.
Put another way, the compiler can arbitrarily interleave the subexpressions within separate arguments:
foo( a() && b(), c() && d() );
The compiler is free to invoke these functions in the order a(), c(), d(), b() if it pleases.