aboutsummaryrefslogtreecommitdiff
path: root/gdb/configure
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2025-03-15 18:13:41 -0400
committerSimon Marchi <simon.marchi@efficios.com>2025-03-17 16:14:08 -0400
commit6fca4d9694bf6d10d1cc41aed8552fe90085eb09 (patch)
tree124548e579158904baa1a362ca1bf9e70c3c1b2a /gdb/configure
parentdf3eb64a53c3589f4e930a89e08e2200e8627509 (diff)
downloadbinutils-6fca4d9694bf6d10d1cc41aed8552fe90085eb09.zip
binutils-6fca4d9694bf6d10d1cc41aed8552fe90085eb09.tar.gz
binutils-6fca4d9694bf6d10d1cc41aed8552fe90085eb09.tar.bz2
gdbsupport: add some -Wunused-* warning flags
Add a few -Wunused-* diagnostic flags that look useful. Some are known to gcc, some to clang, some to both. Fix the fallouts. -Wunused-const-variable=1 is understood by gcc, but not clang. -Wunused-const-variable would be undertsood by both, but for gcc at least it would flag the unused const variables in headers. This doesn't make sense to me, because as soon as one source file includes a header but doesn't use a const variable defined in that header, it's an error. With `=1`, gcc only warns about unused const variable in the main source file. It's not a big deal that clang doesn't understand it though: any instance of that problem will be flagged by any gcc build. Change-Id: Ie20d99524b3054693f1ac5b53115bb46c89a5156 Approved-By: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'gdb/configure')
-rwxr-xr-xgdb/configure6
1 files changed, 6 insertions, 0 deletions
diff --git a/gdb/configure b/gdb/configure
index f4f0262..3080413 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -31295,7 +31295,13 @@ build_warnings=" \
-Wsuggest-override \
-Wunused-but-set-parameter \
-Wunused-but-set-variable \
+-Wunused-const-variable=1 \
-Wunused-function \
+-Wunused-label \
+-Wunused-lambda-capture \
+-Wunused-local-typedefs \
+-Wunused-member-function \
+-Wunused-private-field \
-Wunused-value \
-Wunused-variable \
-Wvla \