Criteria for a warning to be in -Wall? (was: Re: a warning to implement)
Robert Lipe
robertlipe@usa.net
Wed Feb 6 16:09:00 GMT 2002
Joe> Many projects and development teams, both free and non-free, require
Joe> clean compiles with -Wall. What this means is that if we put an option
I have free code that that requires clean compiles with -Wall but also
has to compile with other compilers. When you have a function that has,
say, a fixed prototype (perhaps it's the target of a function dispatch
table) but no actual need for the arguments (maybe it's a stub function)
the 'foo = foo' construct is the only one I've seen that generates zero
additional opcodes, yet shuts up the warnings on all the interesting
compilers.
Tim> 2) avoidable by replacement with an equivalent construct
I'd have a strong preference for something that doesn't rely on GCC
extension. __attribute((unused)) is just as icky in a portable project
as magic /* ARGSUNUSED */ comments recognized by others.
More information about the Gcc
mailing list