This is the mail archive of the gcc@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: Criteria for a warning to be in -Wall? (was: Re: a warning to implement)


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.




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