This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Joy with new GCC 3.3 warnings -- HTF to shut them up?
On Friday 02 May 2003 10:44 am, David O'Brien wrote:
> On Fri, May 02, 2003 at 05:31:47PM +0200, Gabriel Dos Reis wrote:
> > | > -Wall has become de-facto standard, and one of my roles over the last
> > | > decade or so has been to try to keep it that way (getting warnings
> > | > taken out of -Wall if they can't be suppressed without either
> > | > excessive pain or making the code worse).
> > |
> > | It seems -Wall has also grown -Wsign-compare. Much FreeBSD's /usr/src
> > | that was GCC 3.2.2 -Wall -Werror clean now produce tons of:
> > |
> > | "warning: signed and unsigned type in conditional expression"
> > |
> > | was it really the intention that -Wall grow so many new warnings?
> >
> > I think BSD is being bitten by the fuzzy logic around -Wall.
>
> That is true.
>
> > 1) as its name does not suggest, it does not turn on all warnings;
> >
> > 2) There is no well formed, clear stated, widely accepted criteria
> > to apply when considering a warning-switch as candidate for -Wall
>
> One could say the accepted criteria for considering a warning-switch as
> candidate for -Wall is "no". That is, -Wall just warns about things it
> has traditionally done so, and no new warning classes are added to it.
> As mentioned above it is a multi-decade de-facto standard.
It sounds almost as if a two topic approval process is needed:
1) A patch that adds (changes?) a warning is approved/added to the
source code for whatever reasons...
then:
2) A separate approval for that warning to be included in -Wall
Obviously, from this discussion, there is a large enough group of
users and large enough code base that depend on the stable
behavior of "-Wall" to justify the second approval process.
Mike