summaryrefslogtreecommitdiff
path: root/libiberty/configure.ac
diff options
context:
space:
mode:
authorgdr <gdr@138bc75d-0d04-0410-961f-82ee72b054a4>2006-01-29 16:31:08 +0000
committergdr <gdr@138bc75d-0d04-0410-961f-82ee72b054a4>2006-01-29 16:31:08 +0000
commitecefb1e540b0829c753f92d3b334acbeb0b00dd1 (patch)
treed09fa189cd9bdd885ce98dc20f465c0d86bbf679 /libiberty/configure.ac
parentcd62e7b6e18cb6fceedbfbefab44151a5e94b483 (diff)
downloadgcc-ecefb1e540b0829c753f92d3b334acbeb0b00dd1.tar.gz
* configure.ac: Add -Wc++-compat to ac_libibety_warn_cflags
where supported. * configure: Regenerated. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@110375 138bc75d-0d04-0410-961f-82ee72b054a4
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 e77bac70b78..a57685a14ec 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