Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* RFC: sim: don't use -Wuninitialized without -O
@ 2005-03-15 21:08 Jim Blandy
  2005-03-15 23:27 ` Jim Blandy
  0 siblings, 1 reply; 2+ messages in thread
From: Jim Blandy @ 2005-03-15 21:08 UTC (permalink / raw)
  To: gdb-patches


I committed a similar patch for GDB a few days ago; this one is for
the simulators.  I think I've avoided using '==' in this one.  :)
Diffs to generated files omitted.

sim/common/ChangeLog:
2005-02-28  Jim Blandy  <jimb@redhat.com>

	* aclocal.m4 (SIM_AC_OPTION_WARNINGS): Don't include
	-Wuninitialized in the default list of build warnings if CFLAGS is
	set, and doesn't include -O.  (Using -Wuninitialized without
	optimization produces a warning, which interferes with compilation
	with -Werror.)

sim/ChangeLog:
2005-02-28  Jim Blandy  <jimb@redhat.com>

	* d10v/configure.ac, igen/configure.ac, m68hc11/configure.ac,
	mips/configure.ac, mn10300/configure.ac, v850/configure.ac:
	Regenerated, after change to common/aclocal.m4.

Index: sim/common/aclocal.m4
===================================================================
RCS file: /cvs/src/src/sim/common/aclocal.m4,v
retrieving revision 1.9
diff -c -p -r1.9 aclocal.m4
*** sim/common/aclocal.m4	12 Jan 2005 16:23:13 -0000	1.9
--- sim/common/aclocal.m4	28 Feb 2005 20:38:02 -0000
*************** AC_DEFUN(SIM_AC_OPTION_WARNINGS,
*** 790,796 ****
  # NOTE: If you add to this list, remember to update
  # gdb/doc/gdbint.texinfo.
  build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \
! -Wformat -Wparentheses -Wpointer-arith -Wuninitialized"
  # Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs
  # -Wunused-function -Wunused-label -Wunused-variable -Wunused-value
  # -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual
--- 790,807 ----
  # NOTE: If you add to this list, remember to update
  # gdb/doc/gdbint.texinfo.
  build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \
! -Wformat -Wparentheses -Wpointer-arith"
! # GCC supports -Wuninitialized only with -O or -On, n != 0.
! if test x${CFLAGS+set} = xset; then
!   case "${CFLAGS}" in
!     *"-O0"* ) ;;
!     *"-O"* )
!       build_warnings="${build_warnings} -Wuninitialized"
!     ;;
!   esac
! else
!   build_warnings="${build_warnings} -Wuninitialized"
! fi
  # Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs
  # -Wunused-function -Wunused-label -Wunused-variable -Wunused-value
  # -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual


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

end of thread, other threads:[~2005-03-15 23:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-15 21:08 RFC: sim: don't use -Wuninitialized without -O Jim Blandy
2005-03-15 23:27 ` Jim Blandy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox