Re: BUG #2162: Same as bug #1679 - finite() - unresolved symbol

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: flconseil(at)yahoo(dot)fr
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #2162: Same as bug #1679 - finite() - unresolved symbol
Date: 2006-01-11 21:33:03
Message-ID: 28408.1137015183@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"F. Laupretre" <flconseil(at)yahoo(dot)fr> writes:
> Or maybe, if it is really too smart (able to compute the result at
> compile time), we could have not to use a constant argument. Something
> like 'return finite((double)argv) ? 0 : 1'.

If the compiler is able to compute the result without using the external
function, that's fine. That's equivalent to having a macro-based
implementation, which is exactly what we're going out of our way to
allow here. All that we have to do is ensure that the compiler can't
discard the expression un-evaluated, so making the exit value depend
on it seems pretty bulletproof to me.

I suppose though that there's some chance of the constant-argument case
being treated differently from not-constant, so your idea has some merit.
We couldn't use argc/argv however because the autoconf skeleton for
main() doesn't declare 'em.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Euler Taveira de Oliveira 2006-01-12 00:16:16 BUG #2166: attempted to update invisible tuple
Previous Message F. Laupretre 2006-01-11 21:25:24 Re: BUG #2162: Same as bug #1679 - finite() - unresolved symbol