Re: Compiling CVS HEAD with clang under OSX - Mailing list pgsql-hackers

From Neil Conway
Subject Re: Compiling CVS HEAD with clang under OSX
Date
Msg-id AANLkTinWwvWo2wazEMq1y6BwEPO_Tze5aPze6RmCa4yP@mail.gmail.com
Whole thread Raw
In response to Re: Compiling CVS HEAD with clang under OSX  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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 by date:

Previous
From: Neil Conway
Date:
Subject: Re: Compiling CVS HEAD with clang under OSX
Next
From: Pavel Stehule
Date:
Subject: Re: review: xml_is_well_formed