http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48814

--- Comment #7 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-05-02 
15:35:01 UTC ---
(In reply to comment #2)
> Since the order of evaluation is undefined it may evaluate "count++" and
> "incr()" in any order, as it pleases. 
> 
> Since there is a sequence point before entering a function, and before leaving
> a function, and since function invocations do not interleave, we know that no
> matter whether we evaluate "count++" before or after executing "incr", the 
> side
> effects of both "count++" and "++count" do not happen without an intervening
> sequence point.

The side-effects yes, but the read in count++ happens at either before
or after incr is executed.  At least that is my reading of undefined
evaluation order.  Does the sequence point before entering a function
make that evaluation order suddenly defined?

Of course since Joseph seems to agree I won't object to fixing it.

Reply via email to