This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: -Wunused-macros
- From: Fergus Henderson <fjh at cs dot mu dot OZ dot AU>
- To: Neil Booth <neil at daikokuya dot co dot uk>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 24 Jul 2002 06:43:07 +1000
- Subject: Re: -Wunused-macros
- References: <20020723195925.GA12802@daikokuya.co.uk>
On 23-Jul-2002, Neil Booth <neil@daikokuya.co.uk> wrote:
> As recently discussed, here's a patch to warn about macros
> defined in the main file that are not used. Docs and full
> tests included.
I haven't had a look at your patch yet, but I'm in favour of the idea.
One question: will we get warnings for cases where
a macro is only used in a conditionally compiled piece of
code for which the condition is false?
E.g.
#define FOO ...
#ifndef __GNUC__
... FOO ...
#endif
> I've not added it to -Wunused, since -Wall implies -Wunused,
> and I think this option may be too pricey to go there.
Do you have any measurements of the cost?
--
Fergus Henderson <fjh@cs.mu.oz.au> | "I have always known that the pursuit
The University of Melbourne | of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.