Skip to content

Commit

Permalink
Import current --enable-gdb-build-warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Cagney committed Jun 16, 2002
1 parent 3832c25 commit c8cca39
Show file tree
Hide file tree
Showing 31 changed files with 1,529 additions and 1,063 deletions.
4 changes: 4 additions & 0 deletions sim/arm/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2002-06-16 Andrew Cagney <[email protected]>

* configure: Regenerated to track ../common/aclocal.m4 changes.

2002-06-12 Andrew Cagney <[email protected]>

* Makefile.in: Update copyright.
Expand Down
2 changes: 2 additions & 0 deletions sim/arm/configure
Original file line number Diff line number Diff line change
Expand Up @@ -3537,6 +3537,8 @@ done
COPRO=armcopro.o




trap '' 1 2 15
cat > confcache <<\EOF
# This file is a shell script that caches the results of configure
Expand Down
6 changes: 6 additions & 0 deletions sim/common/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2002-06-16 Andrew Cagney <[email protected]>

* aclocal.m4 (SIM_AC_OPTION_WARNINGS): Update to match GDB's
--enable-gdb-build-warnings.
* configure: Regenerated to track ../common/aclocal.m4 changes.

2002-06-09 Aldy Hernandez <[email protected]>

* sim-fpu.c (unpack_fpu): Initialize exponent for
Expand Down
65 changes: 48 additions & 17 deletions sim/common/aclocal.m4
Original file line number Diff line number Diff line change
Expand Up @@ -787,34 +787,65 @@ dnl --enable-build-warnings is for developers of the simulator.
dnl it enables extra GCC specific warnings.
AC_DEFUN(SIM_AC_OPTION_WARNINGS,
[
# NOTE: Don't add -Wall or -Wunused, they both include
# -Wunused-parameter which reports bogus warnings.
# 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
# -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes
# -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls
# -Woverloaded-virtual -Winline -Werror"
AC_ARG_ENABLE(build-warnings,
[ --enable-build-warnings[=LIST] Enable build-time compiler warnings],
[build_warnings="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations"
case "${enableval}" in
[ --enable-build-warnings Enable build-time compiler warnings if gcc is used],
[case "${enableval}" in
yes) ;;
no) build_warnings="-w";;
,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
build_warnings="${build_warnings} ${t}";;
build_warnings="${build_warnings} ${t}";;
*,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
build_warnings="${t} ${build_warnings}";;
*) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
build_warnings="${t} ${build_warnings}";;
*) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
esac
if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
echo "Setting warning flags = $build_warnings" 6>&1
fi
echo "Setting compiler warning flags = $build_warnings" 6>&1
fi])dnl
AC_ARG_ENABLE(sim-build-warnings,
[ --enable-gdb-build-warnings Enable SIM specific build-time compiler warnings if gcc is used],
[case "${enableval}" in
yes) ;;
no) build_warnings="-w";;
,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
build_warnings="${build_warnings} ${t}";;
*,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
build_warnings="${t} ${build_warnings}";;
*) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
esac
if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
fi])dnl
WARN_CFLAGS=""
WERROR_CFLAGS=""
if test "x${build_warnings}" != x -a "x$GCC" = xyes
then
# Separate out the -Werror flag as some files just cannot be
# compiled with it enabled.
for w in ${build_warnings}; do
case $w in
-Werr*) WERROR_CFLAGS=-Werror ;;
*) WARN_CFLAGS="${WARN_CFLAGS} $w"
esac
done
fi],[build_warnings=""])dnl
AC_MSG_CHECKING(compiler warning flags)
# Separate out the -Werror flag as some files just cannot be
# compiled with it enabled.
for w in ${build_warnings}; do
case $w in
-Werr*) WERROR_CFLAGS=-Werror ;;
*) # Check that GCC accepts it
saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $w"
AC_TRY_COMPILE([],[],WARN_CFLAGS="${WARN_CFLAGS} $w",)
CFLAGS="$saved_CFLAGS"
esac
done
AC_MSG_RESULT(${WARN_CFLAGS}${WERROR_CFLAGS})
fi
])
AC_SUBST(WARN_CFLAGS)
AC_SUBST(WERROR_CFLAGS)
Expand Down
4 changes: 4 additions & 0 deletions sim/d10v/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2002-06-16 Andrew Cagney <[email protected]>

* configure: Regenerated to track ../common/aclocal.m4 changes.

2002-06-13 Tom Rix <[email protected]>

* interp.c (xfer_mem): Fix transfers across multiple segments.
Expand Down
Loading

0 comments on commit c8cca39

Please sign in to comment.