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.
This commit is contained in:
Mike Frysinger 2021-06-29 20:33:14 -04:00
parent 999b474b8a
commit 3167423f07
3 changed files with 9 additions and 0 deletions

View file

@ -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

1
sim/configure vendored
View file

@ -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"

View file

@ -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"