Re: sparse (static analyzer) report - Mailing list pgsql-hackers

From Tom Lane
Subject Re: sparse (static analyzer) report
Date
Msg-id 11395.1105821912@sss.pgh.pa.us
Whole thread Raw
In response to Re: sparse (static analyzer) report  (Bruno Wolff III <bruno@wolff.to>)
List pgsql-hackers
Bruno Wolff III <bruno@wolff.to> writes:
>   Greg Stark <gsstark@mit.edu> wrote:
>> What I miss most in both C and Java is the lispish ability to write
>> expressions like:
>> 
>> foo = bar() || baz() || qux();

> Are you sure that C doesn't guarenty short circuit evaluation?
> I don't have my C reference handy, but my memory is that evaluation
> will stop after the first function call that returns true in the
> above expression.

Yeah, but you can only find out the boolean result, not the actually
returned value --- that is, foo will get 1 or 0.
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Marc G. Fournier"
Date:
Subject: Re: FATAL: catalog is missing 1 attribute(s) for relid
Next
From: Tom Lane
Date:
Subject: Re: FATAL: catalog is missing 1 attribute(s) for relid 16396