aboutsummaryrefslogtreecommitdiff
path: root/libiberty/configure.ac
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2006-01-29 20:07:09 +0000
committerDJ Delorie <dj@redhat.com>2006-01-29 20:07:09 +0000
commitfd7d450d2b237084c67c0d519083cc4abdd25732 (patch)
treefe93ae7abf592520723960b400bc7387f46ffc8e /libiberty/configure.ac
parent06d3c8c05c996764a2a3aa36a39fc1e808c234fb (diff)
downloadgdb-fd7d450d2b237084c67c0d519083cc4abdd25732.zip
gdb-fd7d450d2b237084c67c0d519083cc4abdd25732.tar.gz
gdb-fd7d450d2b237084c67c0d519083cc4abdd25732.tar.bz2
merge from gcc
Diffstat (limited to 'libiberty/configure.ac')
-rw-r--r--libiberty/configure.ac16
1 files changed, 16 insertions, 0 deletions
diff --git a/libiberty/configure.ac b/libiberty/configure.ac
index e77bac7..a57685a 100644
--- a/libiberty/configure.ac
+++ b/libiberty/configure.ac
@@ -113,9 +113,25 @@ GCC_NO_EXECUTABLES
AC_PROG_CC
AC_PROG_CPP_WERROR
+# Warn C++ incompatibilities if supported.
+AC_CACHE_CHECK(
+ [whether ${CC} accepts -Wc++-compat],
+ [ac_cv_prog_cc_w_cxx_compat],
+ [save_CFLAGS="$CFLAGS"
+ CFLAGS="-Wc++-compat"
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[]])],
+ [ac_cv_prog_cc_w_cxx_compat=yes],
+ [ac_cv_prog_cc_w_cxx_compat=no])
+ CFLAGS="$save_CFLAGS"
+ ])
+
+
if test x$GCC = xyes; then
ac_libiberty_warn_cflags='-W -Wall -pedantic -Wwrite-strings -Wstrict-prototypes'
fi
+if test $ac_cv_prog_cc_w_cxx_compat = yes ; then
+ ac_libiberty_warn_cflags="${ac_libiberty_warn_cflags} -Wc++-compat"
+fi
AC_SUBST(ac_libiberty_warn_cflags)
AC_PROG_CC_C_O