aboutsummaryrefslogtreecommitdiff
path: root/gdbsupport
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2020-03-11 15:15:12 -0400
committerSimon Marchi <simon.marchi@efficios.com>2020-03-11 15:15:12 -0400
commita0761e34f054767de6d6389929d27e9015fb299b (patch)
treede8062143b2fecd54017af783ca41f6992f67577 /gdbsupport
parent5308d1e77167b4bb133302d7a6f66e599abee420 (diff)
downloadfsf-binutils-gdb-a0761e34f054767de6d6389929d27e9015fb299b.zip
fsf-binutils-gdb-a0761e34f054767de6d6389929d27e9015fb299b.tar.gz
fsf-binutils-gdb-a0761e34f054767de6d6389929d27e9015fb299b.tar.bz2
gdb: enable -Wmissing-prototypes warning
While compiling with clang, I noticed it didn't catch cases where my function declaration didn't match my function definition. This is normally caught by gcc with -Wmissing-declarations. On clang, this is caught by -Wmissing-prototypes instead. Note that on gcc, -Wmissing-prototypes also exists, but is only valid for C and Objective-C. It gets correctly rejected by the configure script since gcc rejects it with: cc1plus: error: command line option '-Wmissing-prototypes' is valid for C/ObjC but not for C++ -Werror So this warning flag ends up not used for gcc (which is what we want). gdb/ChangeLog: * configure: Re-generate. gdbserver/ChangeLog: * configure: Re-generate. gdbsupport/ChangeLog: * configure: Re-generate. * warning.m4: Enable -Wmissing-prototypes.
Diffstat (limited to 'gdbsupport')
-rw-r--r--gdbsupport/ChangeLog5
-rwxr-xr-xgdbsupport/configure1
-rw-r--r--gdbsupport/warning.m41
3 files changed, 7 insertions, 0 deletions
diff --git a/gdbsupport/ChangeLog b/gdbsupport/ChangeLog
index 0fbb71d..f9fe58a 100644
--- a/gdbsupport/ChangeLog
+++ b/gdbsupport/ChangeLog
@@ -1,3 +1,8 @@
+2020-03-11 Simon Marchi <simon.marchi@efficios.com>
+
+ * configure: Re-generate.
+ * warning.m4: Enable -Wmissing-prototypes.
+
2020-03-08 Tom Tromey <tom@tromey.com>
* gdb_binary_search.h: Fix two typos.
diff --git a/gdbsupport/configure b/gdbsupport/configure
index e7a99e3..1b14138 100755
--- a/gdbsupport/configure
+++ b/gdbsupport/configure
@@ -10874,6 +10874,7 @@ build_warnings="-Wall -Wpointer-arith \
-Wdeprecated-copy-dtor \
-Wredundant-move \
-Wmissing-declarations \
+-Wmissing-prototypes \
-Wstrict-null-sentinel \
"
diff --git a/gdbsupport/warning.m4 b/gdbsupport/warning.m4
index 81939ed..649be75 100644
--- a/gdbsupport/warning.m4
+++ b/gdbsupport/warning.m4
@@ -51,6 +51,7 @@ build_warnings="-Wall -Wpointer-arith \
-Wdeprecated-copy-dtor \
-Wredundant-move \
-Wmissing-declarations \
+-Wmissing-prototypes \
-Wstrict-null-sentinel \
"