Re: Compiling CVS HEAD with clang under OSX

From: Neil Conway <neil(dot)conway(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Peter Eisentraut <peter_e(at)gmx(dot)net>
Subject: Re: Compiling CVS HEAD with clang under OSX
Date: 2010-08-02 04:59:28
Message-ID: AANLkTinWwvWo2wazEMq1y6BwEPO_Tze5aPze6RmCa4yP@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Aug 1, 2010 at 9:40 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2010-08-02 06:34:57 Re: review: xml_is_well_formed
Previous Message Neil Conway 2010-08-02 04:54:38 Re: Compiling CVS HEAD with clang under OSX