Re: Compiling CVS HEAD with clang under OSX

Поиск
Список
Период
Сортировка
От Neil Conway
Тема Re: Compiling CVS HEAD with clang under OSX
Дата
Msg-id AANLkTinWwvWo2wazEMq1y6BwEPO_Tze5aPze6RmCa4yP@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Compiling CVS HEAD with clang under OSX  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Sun, Aug 1, 2010 at 9:40 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> I'm still wondering about the bleats I saw for -fwrapv though.
> configure already is set up to install that switch only conditionally:
>
>  # Disable optimizations that assume no overflow; needed for gcc 4.3+
>  PGAC_PROG_CC_CFLAGS_OPT([-fwrapv])
>
> but apparently the test used for this does not notice warning messages.
> Can we improve that?

I think this is a non-issue at least with respect to clang, since they
added support for -fwrapv recently. However, I wonder if the logic
should be the reverse: unless we have evidence to suggest that the
compiler provides the integer overflow behavior we require (e.g., it
supports -fwrapv, sufficiently old GCC, etc.), then we should emit a
warning to suggest that the resulting binary might be buggy.

Neil


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

Предыдущее
От: Neil Conway
Дата:
Сообщение: Re: Compiling CVS HEAD with clang under OSX
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: review: xml_is_well_formed