[ARI] Status of ATTRIBUTE_UNUSED in gdb sources

Pierre Muller pierre.muller@ics-cnrs.unistra.fr
Tue May 4 20:59:00 GMT 2010



> -----Message d'origine-----
> De : gdb-owner@sourceware.org [mailto:gdb-owner@sourceware.org] De la
> part de Jan Kratochvil
> Envoyé : Tuesday, May 04, 2010 6:23 PM
> À : Joel Brobecker
> Cc : Pierre Muller; gdb@sourceware.org; gdb-patches@sourceware.org
> Objet : Re: [ARI] Status of ATTRIBUTE_UNUSED in gdb sources
> 
> On Tue, 04 May 2010 17:37:52 +0200, Joel Brobecker wrote:
> > make sense unless we use -Wunused-param. And I really don't see how
> > this switch could help us increase code quality - only extra hassle
> > trying to silence warnings.
> 
> While I agree ATTRIBUTE_UNUSED is more hassle than benefit I have to
> bring up
> recently -Wunused-param would catch a real bug in an Archer patch
> (missing "bp->thread = tp->num;"):
> 	http://sourceware.org/ml/archer/2010-q2/msg00017.html

  Did you really use -Wunused-param to catch this,
or is it just a case where it could have been useful 
to have this warning?

  I found no easy way to add some extra -Wunused option to
the compiler flags...
  Adding it to CFLAGS has no effects as there is a -Wno-unused
inside WARN_CFLAGS ...

  Maybe we could add a EXTRA_WARN_CFLAGS to Makefile.in

Pierre 



More information about the Gdb mailing list