This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA 6/6] Add -Wunused-but-set-* to build
- From: Tom Tromey <tom at tromey dot com>
- To: Trevor Saunders <tbsaunde at tbsaunde dot org>
- Cc: Tom Tromey <tom at tromey dot com>, gdb-patches at sourceware dot org
- Date: Tue, 07 Jun 2016 20:46:35 -0600
- Subject: Re: [RFA 6/6] Add -Wunused-but-set-* to build
- Authentication-results: sourceware.org; auth=none
- References: <1465248812-23902-1-git-send-email-tom at tromey dot com> <1465248812-23902-7-git-send-email-tom at tromey dot com> <20160608023751 dot GC30231 at ball>
>>>>> "Trevor" == Trevor Saunders <tbsaunde@tbsaunde.org> writes:
Trevor> isn't everything in -Wunused enabled now? can we just delete
Trevor> -Wno-unused and use -Wall to get us -Wunused?
I didn't think of that -- thanks. From the gcc docs I see
-Wunused-label, -Wunused-local-typedefs, and -Wunused-parameter. That
final one seems difficult for gdb given the many functions that are
called via function pointers but which do not use all their arguments.
Once the switch to C++ is complete, such parameters could be nameless.
To me that seems better than sticking ATTRIBUTE_UNUSED in many places.
Tom