On Mon, Aug 02, 2010 at 05:34:57PM +0100, Greg Stark wrote:
> Tom: Because that code is much more complex and prone to errors
> especially when you start getting into multiplication and other
> operations and it's also much slower than the code which allows
> overflow to happen and then checks that
On Mon, Aug 2, 2010 at 4:27 PM, Tom Lane wrote:
> Here's the problem: if the compiler is allowed to assume that overflow
> cannot happen, it is always going to be able to "prove" that the
> if-test is constant false. This is inherent. Anybody claiming to
> exhibit a safe way to code the overflow
Neil Conway writes:
> FWIW, I think we should aim to eventually remove the dependency on
> -fwrapv, and instead make the code correct under the semantics
> guaranteed by the C spec.
[ shrug... ] We've gone around on that before. I can't get excited
about it, and the reason is that 99% of the pl
On Sun, Aug 1, 2010 at 9:40 PM, Tom Lane 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])
On Sun, Aug 1, 2010 at 7:40 PM, Tom Lane wrote:
> I tried to duplicate your results using what I believe to be the latest
> version of clang,
I'm using SVN tip of llvm+clang from ~one week ago.
>> (2) clang doesn't support (or require) "-no-cpp-precomp", which
>> src/template/darwin adds to $CC
Neil Conway writes:
> (As an aside, is "no-cpp-precomp" still necessary for
> reasonably-modern versions of Apple GCC?)
I looked into this point a little bit. Apple abandoned their
nonstandard precompiler as of gcc 3.3, so the switch is a no-op
in that version and later, as per release notes her
Neil Conway writes:
> I tried $subject recently, and noticed some minor issues:
I tried to duplicate your results using what I believe to be the latest
version of clang,
$ clang -v
Apple clang version 1.5 (tags/Apple/clang-60)
Target: x86_64-apple-darwin10
Thread model: posix
(this is a 10.6.4
Neil Conway writes:
> *** src/backend/utils/adt/datetime.c 9 May 2010 02:15:59 - 1.212
> --- src/backend/utils/adt/datetime.c 1 Aug 2010 23:09:30 -
> ***
> *** 3098,3104
> break;
>
Neil Conway writes:
> I tried $subject recently, and noticed some minor issues:
> (1) Two warnings that suggest bugs; in src/backend/utils/adt,
> datetime.c:3101:27: warning: use of logical || with constant operand;
> switch to bitwise | or remove constant
> And similarly for src/interfaces/ecpg
I tried $subject recently, and noticed some minor issues:
(1) Two warnings that suggest bugs; in src/backend/utils/adt,
datetime.c:3101:27: warning: use of logical || with constant operand;
switch to bitwise | or remove constant
And similarly for src/interfaces/ecpg/pgtypeslib/interval.c. Attach
10 matches
Mail list logo