[gdb/symtab] Fix race on dwarf2_per_cu_data::{queued,is_debug_type}
[binutils-gdb.git] / gdbsupport / warning.m4
index c88d4c65a078afbf6581e349b4a9526ae88ac3fa..ea573c63c4a0d08e1527e14b37a8aa29d9e9433a 100644 (file)
@@ -1,5 +1,5 @@
 dnl Autoconf configure script for GDB, the GNU debugger.
-dnl Copyright (C) 1995-2020 Free Software Foundation, Inc.
+dnl Copyright (C) 1995-2023 Free Software Foundation, Inc.
 dnl
 dnl This file is part of GDB.
 dnl
@@ -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