Re: Compiling CVS HEAD with clang under OSX
Neil Conway <neil.conway@gmail.com>
From: Neil Conway <neil.conway@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>, Peter Eisentraut <peter_e@gmx.net>
Date: 2010-08-02T04:59:28Z
Lists: 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