public inbox for gdb-cvs@sourceware.org help / color / mirror / Atom feed
From: Simon Marchi <simark@sourceware.org> To: gdb-cvs@sourceware.org Subject: [binutils-gdb] gdb: enable -Wmissing-prototypes warning Date: Wed, 11 Mar 2020 19:15:48 +0000 (GMT) [thread overview] Message-ID: <20200311191548.A976139450FC@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=a0761e34f054767de6d6389929d27e9015fb299b commit a0761e34f054767de6d6389929d27e9015fb299b Author: Simon Marchi <simon.marchi@efficios.com> Date: Wed Mar 11 15:15:12 2020 -0400 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. Diff: --- gdb/ChangeLog | 4 ++++ gdb/configure | 1 + gdbserver/ChangeLog | 4 ++++ gdbserver/configure | 1 + gdbsupport/ChangeLog | 5 +++++ gdbsupport/configure | 1 + gdbsupport/warning.m4 | 1 + 7 files changed, 17 insertions(+) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 465bef0d29f..e8fc63cc25a 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -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. diff --git a/gdb/configure b/gdb/configure index f99cbe40f11..47ca77f400c 100755 --- a/gdb/configure +++ b/gdb/configure @@ -16323,6 +16323,7 @@ build_warnings="-Wall -Wpointer-arith \ -Wdeprecated-copy-dtor \ -Wredundant-move \ -Wmissing-declarations \ +-Wmissing-prototypes \ -Wstrict-null-sentinel \ " diff --git a/gdbserver/ChangeLog b/gdbserver/ChangeLog index 16346de8dec..ef8addbfe87 100644 --- a/gdbserver/ChangeLog +++ b/gdbserver/ChangeLog @@ -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. diff --git a/gdbserver/configure b/gdbserver/configure index be5719eb77a..13ac7188454 100755 --- a/gdbserver/configure +++ b/gdbserver/configure @@ -9616,6 +9616,7 @@ build_warnings="-Wall -Wpointer-arith \ -Wdeprecated-copy-dtor \ -Wredundant-move \ -Wmissing-declarations \ +-Wmissing-prototypes \ -Wstrict-null-sentinel \ " diff --git a/gdbsupport/ChangeLog b/gdbsupport/ChangeLog index 0fbb71d9e56..f9fe58a7f59 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 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 \ " diff --git a/gdbsupport/warning.m4 b/gdbsupport/warning.m4 index 81939ed7610..649be7552dd 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 \ "
reply other threads:[~2020-03-11 19:15 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20200311191548.A976139450FC@sourceware.org \ --to=simark@sourceware.org \ --cc=gdb-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).