diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2020-03-11 15:15:12 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2020-03-11 15:15:12 -0400 |
commit | a0761e34f054767de6d6389929d27e9015fb299b (patch) | |
tree | de8062143b2fecd54017af783ca41f6992f67577 /gdb | |
parent | 5308d1e77167b4bb133302d7a6f66e599abee420 (diff) | |
download | gdb-a0761e34f054767de6d6389929d27e9015fb299b.zip gdb-a0761e34f054767de6d6389929d27e9015fb299b.tar.gz 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 'gdb')
-rw-r--r-- | gdb/ChangeLog | 4 | ||||
-rwxr-xr-x | gdb/configure | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 465bef0..e8fc63c 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 f99cbe4..47ca77f 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 \ " |