Re: patch: garbage error strings in libpq
От | Neil Conway |
---|---|
Тема | Re: patch: garbage error strings in libpq |
Дата | |
Msg-id | 42CBD070.9060101@samurai.com обсуждение исходный текст |
Ответ на | Re: patch: garbage error strings in libpq (jtv@xs4all.nl) |
Ответы |
Re: patch: garbage error strings in libpq
|
Список | pgsql-patches |
jtv@xs4all.nl wrote: > That is pretty much what I remember hearing at the time. > A well-known way to trigger undefined behaviour is "x++=x++;" because > there is no sequence point between the two side effects. Try it: gcc will > give you a stern warning. Given that there is no sequence point between > argument expressions, as per the paragraph you quote, the same must go for > "c(x++,x++)". So then it becomes dubious that there is suddenly a > guarantee for "c(a(),b())"! Right; my interpretation is that the "sequence point before function call" rule applies recursively. So in c(a(...), b(...)), there are in fact three sequence points, which precede the calls of a, b, and c. Shouldn't that be sufficient to ensure that the evaluation of libpq_gettext() is not interleaved with the evaluation of the other arguments to the printf()? -Neil
В списке pgsql-patches по дате отправления: