[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: changing "configure" to default to "gcc -g -O2 -fwrapv ..."

From: Kaveh R. GHAZI
Subject: Re: changing "configure" to default to "gcc -g -O2 -fwrapv ..."
Date: Sat, 30 Dec 2006 13:57:42 -0500 (EST)

On Sat, 30 Dec 2006, Gabriel Dos Reis wrote:

> "Kaveh R. GHAZI" <address@hidden> writes:
> [...]
> | I'd like to see a -Warning flag added to GCC to spot places where GCC does
> | something potentially too aggressive.  Having that would do two things, it
> | would make it easier for maintainers to audit their code, and it would
> | make it easier for us to get hard data on how often code will break.
> | There has been too much guessing and extrapolating in this discussion so
> | far IMHO.
> |
> | Such a flag has been already suggested more than once.  Here are two cases
> | I found without trying too hard.
> |
> |
> |
> | Is there some technical reason why we can't do this like we did for
> | -Wstrict-aliasing?  Would we get a zillion false positives?
> Indeed a warning for cases where we know GCC optimizers actively take
> advantages of "undefined behaviour" will be very useful -- both for
> checking and collecting data.  Do we have an approximate list of those
> cases used by the optimizers?
> -- Gaby

Yes.  In my followup to the first link above I found only 39 places where
flag_wrapv is used.  That should be an upper-bound on the number of places
we'd have to hook the warning into.

Ian does an excellent job of enumerating the different types of
optimizations GCC performs in the second link.

Kaveh R. Ghazi                  address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]