public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH/committed] sim: warnings: add more flags
@ 2023-12-17  5:15 Mike Frysinger
  0 siblings, 0 replies; 2+ messages in thread
From: Mike Frysinger @ 2023-12-17  5:15 UTC (permalink / raw)
  To: gdb-patches

We already build cleanly with these.
---
 sim/configure                    | 3 +++
 sim/m4/sim_ac_option_warnings.m4 | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/sim/m4/sim_ac_option_warnings.m4 b/sim/m4/sim_ac_option_warnings.m4
index 6e6add652fcb..7bcf9af7804f 100644
--- a/sim/m4/sim_ac_option_warnings.m4
+++ b/sim/m4/sim_ac_option_warnings.m4
@@ -58,12 +58,15 @@ build_warnings="$build_warnings
 -Wimplicit-int
 -Wincompatible-function-pointer-types
 -Wincompatible-pointer-types
+-Wint-conversion
 -Wmisleading-indentation
 -Wmissing-parameter-type
 -Wmissing-prototypes
 -Wold-style-declaration
 -Wold-style-definition
 -Wpointer-sign
+-WWreturn-mismatch
+-Wstrict-prototypes
 dnl The cgen virtual insn logic involves enum conversions.
 dnl Disable until we can figure out how to make this work.
 -Wno-enum-conversion
-- 
2.43.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH/committed] sim: warnings: add more flags
@ 2023-12-07  3:10 Mike Frysinger
  0 siblings, 0 replies; 2+ messages in thread
From: Mike Frysinger @ 2023-12-07  3:10 UTC (permalink / raw)
  To: gdb-patches

Sync with the list of flags from gdbsupport, and add a few more of
our own to catch recent issues.  Comment out the C++-specific flags
as we don't build with C++.
---
 sim/configure                    | 19 +++++++++++++++----
 sim/m4/sim_ac_option_warnings.m4 | 26 ++++++++++++++++++++++----
 2 files changed, 37 insertions(+), 8 deletions(-)

diff --git a/sim/m4/sim_ac_option_warnings.m4 b/sim/m4/sim_ac_option_warnings.m4
index b66e0ec3b5c3..e453d8866ff0 100644
--- a/sim/m4/sim_ac_option_warnings.m4
+++ b/sim/m4/sim_ac_option_warnings.m4
@@ -36,16 +36,34 @@ fi
 
 dnl The options we'll try to enable.
 dnl NB: Kept somewhat in sync with gdbsupport/warnings.m4.
-build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith
+build_warnings="-Wall -Wpointer-arith
 -Wno-unused -Wunused-value -Wunused-function
 -Wno-switch -Wno-char-subscripts
 -Wempty-body -Wunused-but-set-parameter
--Wno-error=maybe-uninitialized
+-Wno-sign-compare -Wno-error=maybe-uninitialized
+dnl C++ -Wno-mismatched-tags
+-Wno-error=deprecated-register
+dnl C++ -Wsuggest-override
+dnl C++ -Wdeprecated-copy
+dnl C++ -Wdeprecated-copy-dtor
+dnl C++ -Wredundant-move
 -Wmissing-declarations
+dnl C++ -Wstrict-null-sentinel
+"
+dnl Some extra warnings we use in the sim.
+build_warnings="$build_warnings
+-Wdeclaration-after-statement
+-Wdeprecated-non-prototype
+-Wimplicit-function-declaration
+-Wimplicit-int
+-Wincompatible-function-pointer-types
+-Wincompatible-pointer-types
+-Wmisleading-indentation
+-Wmissing-parameter-type
 -Wmissing-prototypes
--Wdeclaration-after-statement -Wmissing-parameter-type
+-Wold-style-declaration
+-Wold-style-definition
 -Wpointer-sign
--Wold-style-declaration -Wold-style-definition
 "
 
 case "${host}" in
-- 
2.43.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-12-17  5:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-17  5:15 [PATCH/committed] sim: warnings: add more flags Mike Frysinger
  -- strict thread matches above, loose matches on Subject: below --
2023-12-07  3:10 Mike Frysinger

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).