[binutils-gdb] sim: use -Wno-error=maybe-uninitialized

Michael Frysinger vapier@sourceware.org
Wed Jun 30 02:22:34 GMT 2021


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=3167423f079e08f530df30eccad2a467c8ad5014

commit 3167423f079e08f530df30eccad2a467c8ad5014
Author: Mike Frysinger <vapier@gentoo.org>
Date:   Tue Jun 29 20:33:14 2021 -0400

    sim: use -Wno-error=maybe-uninitialized
    
    We have some code tripping this warning, but it depends on the gcc
    version & optimization levels.  We've added some hints to the code
    so some versions of gcc work better, but still not all.  Let's just
    disable the warning like gdb does.

Diff:
---
 sim/ChangeLog                    | 5 +++++
 sim/configure                    | 1 +
 sim/m4/sim_ac_option_warnings.m4 | 3 +++
 3 files changed, 9 insertions(+)

diff --git a/sim/ChangeLog b/sim/ChangeLog
index d63e656cb33..959d3582da1 100644
--- a/sim/ChangeLog
+++ b/sim/ChangeLog
@@ -1,3 +1,8 @@
+2021-06-29  Mike Frysinger  <vapier@gentoo.org>
+
+	* m4/sim_ac_option_warnings.m4: Add -Wno-error=maybe-uninitialized.
+	* configure: Regenerate.
+
 2021-06-27  Mike Frysinger  <vapier@gentoo.org>
 
 	* arch-subdir.mk.in: Move TERMCAP and READLINE variables from
diff --git a/sim/configure b/sim/configure
index 34cd1c9e8a2..3120006e6d5 100755
--- a/sim/configure
+++ b/sim/configure
@@ -14588,6 +14588,7 @@ build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
 -Wpointer-sign \
 -Wno-unused -Wunused-value -Wunused-function \
 -Wno-switch -Wno-char-subscripts -Wmissing-prototypes
+-Wno-error=maybe-uninitialized
 -Wdeclaration-after-statement -Wempty-body -Wmissing-parameter-type \
 -Wold-style-declaration -Wold-style-definition"
 
diff --git a/sim/m4/sim_ac_option_warnings.m4 b/sim/m4/sim_ac_option_warnings.m4
index 5a0fe304e9c..05c77f1b92d 100644
--- a/sim/m4/sim_ac_option_warnings.m4
+++ b/sim/m4/sim_ac_option_warnings.m4
@@ -35,10 +35,13 @@ if test "${ERROR_ON_WARNING}" = yes ; then
   WERROR_CFLAGS="-Werror"
 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 \
 -Wpointer-sign \
 -Wno-unused -Wunused-value -Wunused-function \
 -Wno-switch -Wno-char-subscripts -Wmissing-prototypes
+-Wno-error=maybe-uninitialized
 -Wdeclaration-after-statement -Wempty-body -Wmissing-parameter-type \
 -Wold-style-declaration -Wold-style-definition"


More information about the Gdb-cvs mailing list