gdb: enable -Wmissing-prototypes warning
authorSimon Marchi <simon.marchi@efficios.com>
Wed, 11 Mar 2020 19:15:12 +0000 (15:15 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Wed, 11 Mar 2020 19:15:12 +0000 (15:15 -0400)
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.

gdb/ChangeLog
gdb/configure
gdbserver/ChangeLog
gdbserver/configure
gdbsupport/ChangeLog
gdbsupport/configure
gdbsupport/warning.m4

index 465bef0d29f5fe0f31d9c15b3f9c415335f1ef37..e8fc63cc25a046a60ffbb25451c5a6e577582e69 100644 (file)
@@ -1,3 +1,7 @@
+2020-03-11  Simon Marchi  <simon.marchi@efficios.com>
+
+       * configure: Re-generate.
+
 2020-03-11  Tom Tromey  <tromey@adacore.com>
 
        * ada-typeprint.c (print_choices): Fix comment.
index f99cbe40f11fc6af01c377248e60d222e2d3856b..47ca77f400c88b12a2b5681a4f41be129ba69df2 100755 (executable)
@@ -16323,6 +16323,7 @@ build_warnings="-Wall -Wpointer-arith \
 -Wdeprecated-copy-dtor \
 -Wredundant-move \
 -Wmissing-declarations \
+-Wmissing-prototypes \
 -Wstrict-null-sentinel \
 "
 
index 16346de8dec57146c3ce642f08a4a079ececf6c4..ef8addbfe87f1436f5d0951db03e29ffe4fdc420 100644 (file)
@@ -1,3 +1,7 @@
+2020-03-11  Simon Marchi  <simon.marchi@efficios.com>
+
+       * configure: Re-generate.
+
 2020-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
 
        * .dir-locals.el: New file.
index be5719eb77aa154e28a2d0cb3468ae6b085c719a..13ac7188454da109904ead5cd5b226bde7524a5d 100755 (executable)
@@ -9616,6 +9616,7 @@ build_warnings="-Wall -Wpointer-arith \
 -Wdeprecated-copy-dtor \
 -Wredundant-move \
 -Wmissing-declarations \
+-Wmissing-prototypes \
 -Wstrict-null-sentinel \
 "
 
index 0fbb71d9e5613f7805acae4dca35fc039d309126..f9fe58a7f591c4590fed7a94159e01b31245ad34 100644 (file)
@@ -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.
index e7a99e3ddfba2de630afbf9f390e96a107b8da23..1b141387e5a191b1ea2406ba1a351c0a06b1d110 100755 (executable)
@@ -10874,6 +10874,7 @@ build_warnings="-Wall -Wpointer-arith \
 -Wdeprecated-copy-dtor \
 -Wredundant-move \
 -Wmissing-declarations \
+-Wmissing-prototypes \
 -Wstrict-null-sentinel \
 "
 
index 81939ed7610272067d9be565be026c3840bd776b..649be7552dd10942dbf983a83b69179b6316cf6c 100644 (file)
@@ -51,6 +51,7 @@ build_warnings="-Wall -Wpointer-arith \
 -Wdeprecated-copy-dtor \
 -Wredundant-move \
 -Wmissing-declarations \
+-Wmissing-prototypes \
 -Wstrict-null-sentinel \
 "