> That would answer the big question here, but where does it say that?

Also, if you really insist on an authoritative statement, try this text
(from Annex D of the C99 draft standard, "Formal model of sequence

       D.2.2  Function calls                                        |

       [#1] Where an expression involves a function call, that call |
       is ``atomic'' for the purposes of this model.  There must be |
       a  sequence point immediately before (see and after |
       each function  call  (either  because  it  ends  in  a  full |
       expression,  or  because it is required by 7.1.4), and so it |
       can be seen that  the  effects  of  the  call   --  for  the |
       purposes of the surrounding expression  -- can be determined |
       purely by the read and write events involved in it, ignoring |
       their  ordering.   These  events cannot be interspersed with |
       events from outside the call.  Therefore this model treats a |
       function call as being a sequence point.                     |

Cross-function optimization by the compiler is all well and dandy,
but it is on the compiler's head to make sure it doesn't change
the observable semantics of the program.  Not ours.

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?


Reply via email to