Re: patch: garbage error strings in libpq

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: jtv(at)xs4all(dot)nl
Cc: "Neil Conway" <neilc(at)samurai(dot)com>, pgsql-patches(at)postgresql(dot)org
Subject: Re: patch: garbage error strings in libpq
Date: 2005-07-08 14:15:27
Message-ID: 13079.1120832127@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

jtv(at)xs4all(dot)nl writes:
> 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
points"):

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 6.5.2.2) 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

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Marko Kreen 2005-07-08 17:54:40 [patch 0/2] Add Fortuna PRNG to pgcrypto
Previous Message Tom Lane 2005-07-08 13:58:50 Re: patch: garbage error strings in libpq