This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH RFC: -Wstrict-overflow
Ian Lance Taylor wrote:
> Mark Mitchell <mark@codesourcery.com> writes:
>
>> To be honest, your examples are making me a little concerned that
>> -Wsigned-overflow isn't going to be much of a win. It seems like many
>> programs are going to fall afoul of it, and that it will be hard to
>> silence. So, except for the truly dedicated, willing to go through and
>> clean up (or selectively disable warnings) on each occurrence, this is
>> going to have a low signal-to-noise ratio.
>
> Yes. I think the gcc developers in general have been pretty
> consistent in saying that all along in this discussion.
OK. Sorry to be clueless. :-(
> What do people think about different levels for -Wstrict-overflow? My
> main concern with that would be classifying them in the first place,
> and maintaining the classification over time.
I suppose we could also give them different warning codes, so that the
fine-grained warning stuff could turn them on independently. That
doesn't do anything to change your concern; it's just a UI option. I
hate to raise the bar, but I guess I think that either levels or
separable control of the warnings would make the feature more useful,
since some of the cases do seem more likely to be dangerous than others.
Sorry,
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713