Dne 17.02.10 18:39, Peter Eisentraut napsal(a):
On ons, 2010-02-17 at 11:26 -0500, Tom Lane wrote:
But the behavior gcc appears to exhibit is that it won't warn about
variables that are only assigned once before the PG_TRY is entered,
and that seems reasonable to me since such a variable ought to have
the correct value either way.

FWIW, this is a Sun Studio build that is complaining here.


Yes It is SS12. I add volatile keyword and problem disappears. The code difference is following:


<     PLy_spi_execute+0x742:  83 ec 0c           subl   $0xc,%esp
<     PLy_spi_execute+0x745:  ff b5 b8 f9 ff ff  pushl  0xfffff9b8(%ebp)
<     PLy_spi_execute+0x74b:  e8 fc ff ff ff     call   MemoryContextSwitch


> PLy_spi_execute+0x742: 8b 85 cc f9 ff ff movl 0xfffff9cc(%ebp),%eax
>     PLy_spi_execute+0x748:  83 ec 0c           subl   $0xc,%esp
>     PLy_spi_execute+0x74b:  50                 pushl  %eax
>     PLy_spi_execute+0x74c:  e8 fc ff ff ff     call   MemoryContextSwitch

Good to mention that SS inline PLy_spi_execute_query inside PLy_spi_execute(), because it is only one caller.


        Zdenek

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to