This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: GCC warnings for unused global variables
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: Joe Buck <jbuck at synopsys dot com>
- Cc: Robert Dewar <dewar at gnat dot com>, espie at quatramaran dot ens dot fr, gcc at gcc dot gnu dot org
- Date: 02 May 2003 14:46:41 +0200
- Subject: Re: GCC warnings for unused global variables
- Organization: Integrable Solutions
- References: <20030501110508.6E8E7F2D7E@nile.gnat.com><20030501093505.D21602@synopsys.com>
Joe Buck <jbuck@synopsys.com> writes:
| On Thu, May 01, 2003 at 07:05:08AM -0400, Robert Dewar wrote:
| > > And warning on perfectly legal, innocuous constructs makes
| > > absolutely no sense to me.
| >
| > Well all warnings apply to legal constructs, or they would be errors!
|
| > As to innocuous, the reason why something is NOT an error is that you
| > can't tell whether it is innocous or not, so warnings almost always
| > generate some false positives (or they would not be warnings!)
|
| Correct, but in this case, we've broken a 20-year-old convention.
| "Broken", that is, because we've carefully designed -Wall so that
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| we can expect that high-quality software development processes can
| produce their code with -Wall -Werror.
I disagree with that statement, because right now we don't have
clearly defined and accepted semantics for "-Wall", which partly
explains why we keep discussing what -Wall should do or not do.
-- Gaby