Re: Need -fwrapv or -fno-strict-overflow for gcc-4.3 - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Need -fwrapv or -fno-strict-overflow for gcc-4.3
Date
Msg-id 29742.1205129433@sss.pgh.pa.us
Whole thread Raw
In response to Need -fwrapv or -fno-strict-overflow for gcc-4.3  (Kris Jurka <books@ejurka.com>)
Responses Re: Need -fwrapv or -fno-strict-overflow for gcc-4.3
List pgsql-hackers
Kris Jurka <books@ejurka.com> writes:
> Gcc 4.3 has started to perform optimizations based on the denial of the 
> existence of signed overflow. Building CVS HEAD with gcc 4.3rc2 I get the 
> following warnings:

Hmm, I suspect that it's not so much that they're performing new
optimizations as that they're being polite enough to warn us about it.
Which is a step forward, because one of the main gripes I had about this
before was that there was no way to tell where it broke your code.  Now
you can tell; not that they've provided any useful alternative to
choosing -fwrapv, but at least you can tell what they broke.

This list is actually pretty scary, because what it tells us in so many
words is that gcc 4.3 is diking out a lot of security-critical overflow
checks.  My old gripe you cited was about gcc 4.1.  I am wondering if
these checks have been no-ops in Postgres builds done with gcc 4.1 and
up, and we're only just now being told about it.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Kris Jurka
Date:
Subject: Need -fwrapv or -fno-strict-overflow for gcc-4.3
Next
From: Oleg Bartunov
Date:
Subject: Re: Include Lists for Text Search