This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Switch -Wunused-variable on?
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: Sergio Durigan Junior <sergiodj at redhat dot com>
- Cc: gdb at sourceware dot org
- Date: Sun, 22 Apr 2012 10:22:40 +0200
- Subject: Re: Switch -Wunused-variable on?
- References: <m3fwbwxmor.fsf@redhat.com>
On Sun, 22 Apr 2012 09:14:44 +0200, Sergio Durigan Junior wrote:
> However, before continuing to prepare this patch, I would like what you
> think about enabling -Wunused-variable by default in the building.
There are more useful -Wunused* options, GDB uses now:
-Wno-unused -Wunused-value -Wunused-function
IIRC the counterargument for -Wunused-variable was that GDB contains various
#if-compiled code where is a nightmare to get the code right with matching
#if-clauses also for the variables being used by various #if-compiled code
chunks. I could not find that mail now in the time I gave to it.
I believe more -Wunused* would be worth it, maybe the mail was before Joel
started to disable -Werror for releases so that claim about problematic
#if-clauses is no longer valid.
Thanks,
Jan