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 21:43:01 -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> <87shwo5rec dot fsf at tromey dot com> <20160608032455 dot GD30231 at ball>
Trevor> the docs for -Wunused-parameter are... tricky, but I believe what they
Trevor> say is -Wall -Wunused does not enable -Wunused-parameter, to enable
Trevor> -Wunused-parameter you either need to pass it explicitly, or pass
Trevor> -Wextra -Wunused.
Yes, I see. I think I misread them. They say:
'-Wunused'
All the above '-Wunused' options combined.
In order to get a warning about an unused function parameter, you
must either specify '-Wextra -Wunused' (note that '-Wall' implies
'-Wunused'), or separately specify '-Wunused-parameter'.
The first line implies that -Wunused-parameter is part of this, but then
subsequent text says not.
I'll give it a try and see what happens.
Tom