This is the mail archive of the
mailing list for the GCC project.
Re: a warning to implement
- From: Tim Hollebeek <tim at hollebeek dot com>
- To: Gabriel Dos Reis <gdr at codesourcery dot com>
- Cc: Bernard Dautrevaux <Dautrevaux at microprocess dot com>, dewar at gnat dot com, aoliva at redhat dot com, coola at ngs dot ru, gcc at gcc dot gnu dot org, pcarlini at unitus dot it
- Date: Tue, 5 Feb 2002 13:00:06 -0500
- Subject: Re: a warning to implement
- References: <17B78BDF120BD411B70100500422FC6309E45C@IIS000> <email@example.com>
- Reply-to: tim at hollebeek dot com
> Please, note that I'm not saying that GCC should not have an option to
> trigger the proposed warning. I'm saying that that shouldn't be on by
> default in -Wall.
Then noone will have it on (because it is such a rare case they won't
realize they might need it).
Why can't these rare and hypothetical people with a use for 'T x = x;'
use '-Wall -Wno-warn-self-initialization' ?
It seems to me if a warning is:
1) avoidable via replacement with equivalent construct
2) generates no warnings on >90% (or >99%) of code
it belongs in -Wall. Cater to the majority, not the minority.