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  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-bugs
"F. Laupretre" <flconseil@yahoo.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

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #2162: Same as bug #1679 - finite() - unresolved symbol
Следующее
От: "Euler Taveira de Oliveira"
Дата:
Сообщение: BUG #2166: attempted to update invisible tuple