This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
RE: [ARI] Status of ATTRIBUTE_UNUSED in gdb sources
- From: "Pierre Muller" <pierre dot muller at ics-cnrs dot unistra dot fr>
- To: "'Jan Kratochvil'" <jan dot kratochvil at redhat dot com>, "'Joel Brobecker'" <brobecker at adacore dot com>
- Cc: <gdb at sourceware dot org>, <gdb-patches at sourceware dot org>
- Date: Tue, 4 May 2010 22:58:58 +0200
- Subject: RE: [ARI] Status of ATTRIBUTE_UNUSED in gdb sources
- References: <002701caeb90$894ad040$9be070c0$@muller@ics-cnrs.unistra.fr> <20100504153752.GJ2768@adacore.com> <20100504162233.GA1910@host0.dyn.jankratochvil.net>
> -----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