diff options
Diffstat (limited to 'gdbsupport/warning.m4')
-rw-r--r-- | gdbsupport/warning.m4 | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gdbsupport/warning.m4 b/gdbsupport/warning.m4 index a6b06e880c2..e9025db7ece 100644 --- a/gdbsupport/warning.m4 +++ b/gdbsupport/warning.m4 @@ -51,10 +51,16 @@ build_warnings="-Wall -Wpointer-arith \ -Wdeprecated-copy-dtor \ -Wredundant-move \ -Wmissing-declarations \ --Wmissing-prototypes \ -Wstrict-null-sentinel \ " +# The -Wmissing-prototypes flag will be accepted by GCC, but results +# in a warning being printed about the flag not being valid for C++, +# this is something to do with using ccache, and argument ordering. +if test "$GDB_COMPILER_TYPE" != gcc; then + build_warnings="$build_warnings -Wmissing-prototypes" +fi + case "${host}" in *-*-mingw32*) # Enable -Wno-format by default when using gcc on mingw since many |