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

Поиск
Список
Период
Сортировка
Искать
От
Tom Lane
Тема
Re: BUG #2162: Same as bug #1679 - finite() - unresolved symbol
Дата
Msg-id
28408.1137015183@sss.pgh.pa.us
Ответ на
Список
Дерево обсуждения
BUG #2162: Same as bug #1679 - finite() - unresolved symbol "Francois Laupretre" <flconseil@yahoo.fr>
Re: BUG #2162: Same as bug #1679 - finite() - unresolved symbol Tom Lane <tgl@sss.pgh.pa.us>
Re: BUG #2162: Same as bug #1679 - finite() - unresolved symbol "F. Laupretre" <flconseil@yahoo.fr>
Re: BUG #2162: Same as bug #1679 - finite() - unresolved symbol Tom Lane <tgl@sss.pgh.pa.us>
Re: BUG #2162: Same as bug #1679 - finite() - unresolved symbol Tom Lane <tgl@sss.pgh.pa.us>
Re: BUG #2162: Same as bug #1679 - finite() - unresolved symbol Bruce Momjian <pgman@candle.pha.pa.us>
Re: BUG #2162: Same as bug #1679 - finite() - unresolved symbol Tom Lane <tgl@sss.pgh.pa.us>
Re: BUG #2162: Same as bug #1679 - finite() - unresolved symbol "F. Laupretre" <flconseil@yahoo.fr>
Re: BUG #2162: Same as bug #1679 - finite() - unresolved symbol "F. Laupretre" <flconseil@yahoo.fr>
Re: BUG #2162: Same as bug #1679 - finite() - unresolved symbol Tom Lane <tgl@sss.pgh.pa.us>
Re: BUG #2162: Same as bug #1679 - finite() - unresolved symbol Peter Eisentraut <peter_e@gmx.net>
Re: BUG #2162: Same as bug #1679 - finite() - unresolved symbol Tom Lane <tgl@sss.pgh.pa.us>
Re: BUG #2162: Same as bug #1679 - finite() - unresolved symbol flaupretre@free.fr
Re: BUG #2162: Same as bug #1679 - finite() - unresolved symbol Peter Eisentraut <peter_e@gmx.net>
Re: BUG #2162: Same as bug #1679 - finite() - unresolved symbol Tom Lane <tgl@sss.pgh.pa.us>
"F. Laupretre"  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
В списке pgsql-bugs по дате отправления
От: Tom Lane
Дата:
От: Euler Taveira de Oliveira
Дата:
FAQ