This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH RFC: -Wstrict-overflow


Mark Mitchell wrote:
> Yeah, that's brutal.
> 
> The problem is that the warning (like some of the other warnings that we
> use the middle-end infrastructure to produce) gets far away from the
> user's code.  I'd bet many programmers would have a very hard time
> tracking back from the warning message to the alleged problem.
> 
> To be honest, your examples are making me a little concerned that
> -Wsigned-overflow isn't going to be much of a win.

The warnings serve two purposes:

* alert users to issues that might now or at some future time cause
  results that the user might not expect.

* help users find potential problems.

The first purpose needs to be the default.  The second purpose
should not sweat false positives because the developer is not making
an ordinary build.  Of course, the ratio still needs to be more like
separating wheat from chaff than finding a needle in a haystack.  :)
Anyway, having these two levels of warning (plus shut up entirely)
is very useful.  Discrimination beyond that is nice and fancy and all,
but I doubt it would be extremely useful.

Thanks for doing the discrimination work!!

Cheers - Bruce


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]