This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: -Wunused-macros


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]