From a0761e34f054767de6d6389929d27e9015fb299b Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Wed, 11 Mar 2020 15:15:12 -0400 Subject: 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. --- gdbsupport/configure | 1 + 1 file changed, 1 insertion(+) (limited to 'gdbsupport/configure') diff --git a/gdbsupport/configure b/gdbsupport/configure index e7a99e3ddfb..1b141387e5a 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 \ " -- cgit v1.2.1