From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from kwanyin.sergiodj.net (kwanyin.sergiodj.net [158.69.185.54]) by sourceware.org (Postfix) with ESMTPS id E2A57385F02A for ; Fri, 20 Mar 2020 18:59:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org E2A57385F02A Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [binutils-gdb] gdb: enable -Wmissing-prototypes warning From: gdb-buildbot@sergiodj.net To: gdb-testers@sourceware.org Message-Id: Date: Fri, 20 Mar 2020 14:59:14 -0400 X-Spam-Status: No, score=-26.7 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, URIBL_CSS, URIBL_CSS_A autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-testers@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-testers mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Mar 2020 18:59:18 -0000 *** TEST RESULTS FOR COMMIT a0761e34f054767de6d6389929d27e9015fb299b *** commit a0761e34f054767de6d6389929d27e9015fb299b Author: Simon Marchi AuthorDate: Wed Mar 11 15:15:12 2020 -0400 Commit: Simon Marchi CommitDate: 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 --git a/gdb/ChangeLog b/gdb/ChangeLog index 465bef0d29..e8fc63cc25 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2020-03-11 Simon Marchi + + * configure: Re-generate. + 2020-03-11 Tom Tromey * ada-typeprint.c (print_choices): Fix comment. diff --git a/gdb/configure b/gdb/configure index f99cbe40f1..47ca77f400 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 16346de8de..ef8addbfe8 100644 --- a/gdbserver/ChangeLog +++ b/gdbserver/ChangeLog @@ -1,3 +1,7 @@ +2020-03-11 Simon Marchi + + * configure: Re-generate. + 2020-03-06 Andrew Burgess * .dir-locals.el: New file. diff --git a/gdbserver/configure b/gdbserver/configure index be5719eb77..13ac718845 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 0fbb71d9e5..f9fe58a7f5 100644 --- a/gdbsupport/ChangeLog +++ b/gdbsupport/ChangeLog @@ -1,3 +1,8 @@ +2020-03-11 Simon Marchi + + * configure: Re-generate. + * warning.m4: Enable -Wmissing-prototypes. + 2020-03-08 Tom Tromey * gdb_binary_search.h: Fix two typos. diff --git a/gdbsupport/configure b/gdbsupport/configure index e7a99e3ddf..1b141387e5 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 81939ed761..649be7552d 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 \ "