This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RFC: sim: don't use -Wuninitialized without -O


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]