summaryrefslogtreecommitdiff
path: root/bfd/warning.m4
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2010-04-07 07:19:00 +0000
committerAlan Modra <amodra@bigpond.net.au>2010-04-07 07:19:00 +0000
commitefe95bc91df29b92dbebc317fe52308f9fb87fd3 (patch)
treeb2399c5b28978c3cfc8066b22e6ed69b1ca140f7 /bfd/warning.m4
parent8f8911f2cb35b2b794bbdf0902d75e6e9bbe6874 (diff)
downloadgdb-efe95bc91df29b92dbebc317fe52308f9fb87fd3.tar.gz
* warning.m4 (GCC_WARN_CFLAGS): Only add -Wshadow for gcc-4 and above.
* configure: Regenerate.
Diffstat (limited to 'bfd/warning.m4')
-rw-r--r--bfd/warning.m45
1 files changed, 3 insertions, 2 deletions
diff --git a/bfd/warning.m4 b/bfd/warning.m4
index b4a2f48f8ba..6b846bf4ea3 100644
--- a/bfd/warning.m4
+++ b/bfd/warning.m4
@@ -1,7 +1,8 @@
dnl Common configure.in fragment
AC_DEFUN([AM_BINUTILS_WARNINGS],[
-GCC_WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow"
+GCC_WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
+AC_EGREP_CPP([^[0-3]$],[__GNUC__],,GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Wshadow")
AC_ARG_ENABLE(werror,
[ --enable-werror treat compile warnings as errors],
@@ -11,7 +12,7 @@ AC_ARG_ENABLE(werror,
*) AC_MSG_ERROR(bad value ${enableval} for --enable-werror) ;;
esac])
-# Enable -Wno-format by default when using gcc on mingw
+# Disable -Wformat by default when using gcc on mingw
case "${host}" in
*-*-mingw32*)
if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then