tech-kern archive

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

Re: Where are the specific WARNS=n defined?



In article <201108230521.BAA12599%Sparkle.Rodents-Montreal.ORG@localhost>,
Mouse  <mouse%Rodents-Montreal.ORG@localhost> wrote:
>>> [...] gcc errors due to comparison of signed and unsigned values.
>
>> It is best to fix the errors.
>
>What errors?
>
>It is not necessarily an error to compare signed and unsigned values.
>In my experience, that warning produces so many more false positives
>than useful warnings that I normally shut it off entirely.

And it is not an error to put assignments in conditionals, or not
place parentheses to clarify operator precedence, etc. It is a
warning; the compiler is telling you that it is unclear what you
are trying to do, and you should check to make sure that this is
what you want to do (and let the compiler know by making your
intentions clear). For some of us this is helpful. The compiler
writers try to help protect programmers against common mistakes.
If you don't like the warnings you are free to turn them off.

christos



Home | Main Index | Thread Index | Old Index