diff options
author | Gabriel Dos Reis <gdr@gcc.gnu.org> | 2006-01-29 19:51:40 +0000 |
---|---|---|
committer | Gabriel Dos Reis <gdr@gcc.gnu.org> | 2006-01-29 19:51:40 +0000 |
commit | 373477bba3941f9d05be73dc0e316944a322e490 (patch) | |
tree | 2058d966d037f0687891f28a560aa1bb948d3618 /gcc/configure.ac | |
parent | 2a1d634643cc622fa6c03c3ade04a8994af692cd (diff) | |
download | gcc-373477bba3941f9d05be73dc0e316944a322e490.zip gcc-373477bba3941f9d05be73dc0e316944a322e490.tar.gz gcc-373477bba3941f9d05be73dc0e316944a322e490.tar.bz2 |
configure.ac (cxx_compat_warn): Set if -Wc++-compat is supported.
* configure.ac (cxx_compat_warn): Set if -Wc++-compat is supported.
* Makefile.in (CXX_COMPAT_WARN): Define.
* configure: Regenerate.
cp/
* Make-lang.in (cp-warn): Include CXX_COMPAT_WARN.
* repo.c (extract_string, afgets): Use cast when converting from
void *.
From-SVN: r110380
Diffstat (limited to 'gcc/configure.ac')
-rw-r--r-- | gcc/configure.ac | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/configure.ac b/gcc/configure.ac index dd3823f..77bb042 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -385,6 +385,23 @@ fi AC_SUBST(strict1_warn) +# Get C++ compatibility warning flag, 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${ac_cv_prog_cc_w_cxx_compat} = xyes; then + cxx_compat_warn="-Wc++-compat" +fi +AC_SUBST(cxx_compat_warn) + + # If the native compiler is GCC, we can enable warnings even in stage1. # That's useful for people building cross-compilers, or just running a # quick `make'. |