Re: Is this code safe? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Is this code safe?
Date
Msg-id 15948.1409205051@sss.pgh.pa.us
Whole thread Raw
In response to Is this code safe?  (Pavan Deolasee <pavan.deolasee@gmail.com>)
Responses Re: Is this code safe?
List pgsql-hackers
Pavan Deolasee <pavan.deolasee@gmail.com> writes:
> Can some kind of compiler optimisation reorder things such that the "else
> if" expression is evaluated using the old, uninitialised value of optval?

Any such behavior is patently illegal per the C standard.  Not that that's
always stopped compiler writers; but I think you might be looking at a
compiler bug.  We'd need more context about the exact platform, compiler,
etc.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Pavan Deolasee
Date:
Subject: Is this code safe?
Next
From: Fabien COELHO
Date:
Subject: Re: postgresql latency & bgwriter not doing its job