Re: Anyone for adding -fwrapv to our standard CFLAGS? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Anyone for adding -fwrapv to our standard CFLAGS?
Date
Msg-id 6427.1134487314@sss.pgh.pa.us
Whole thread Raw
In response to Re: Anyone for adding -fwrapv to our standard CFLAGS?  ("Michael Paesold" <mpaesold@gmx.at>)
List pgsql-hackers
"Michael Paesold" <mpaesold@gmx.at> writes:
> What about this one from the bug (by Jakub Jelinek):
> ...
> "Performance will be terrible" does not sound that good.

That's the overstatement of the week, though.  Jakub is merely unhappy
because some new optimizations won't get applied.  At worst -fwrapv will
leave us with the same performance we had before gcc 4.1.

As I said to Jakub, in the end correctness trumps performance every
time.  The risk that gcc 4.1 without -fwrapv will silently break corner
cases in our code is simply not acceptable, and the cost of making sure
that it doesn't is IMHO not worth the (undefined, undocumented)
performance gains that might or might not ensue.

If anyone really wants to argue the point, a useful first step would
be to grab a copy of gcc 4.1 and see if you can detect any overall
performance difference in Postgres compiled with and without -fwrapv.
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Michael Paesold"
Date:
Subject: Regression test horology failure
Next
From: Tom Lane
Date:
Subject: Re: Which qsort is used