From: Uros Bizjak Date: Mon, 3 Oct 2016 15:51:33 +0000 (+0200) Subject: configure.ac (strict_warn): Merge -Wmissing-format-attribute and -Woverloaded-virtual... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ec9d5ad13bf6a965007d727d0dcbc77155e8132a;p=gcc.git configure.ac (strict_warn): Merge -Wmissing-format-attribute and -Woverloaded-virtual checks for warning... * configure.ac (strict_warn): Merge -Wmissing-format-attribute and -Woverloaded-virtual checks for warning options. * configure: Regenerate. From-SVN: r240721 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 824d1a8602c..7f4e311087f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2016-10-03 Uros Bizjak + + * configure.ac (strict_warn): Merge -Wmissing-format-attribute and + -Woverloaded-virtual checks for warning options. + * configure: Regenerate. + 2016-10-03 Bernd Edlinger PR preprocessor/77699 diff --git a/gcc/configure b/gcc/configure index 2503ba97f74..80fc5c71a0e 100755 --- a/gcc/configure +++ b/gcc/configure @@ -6758,63 +6758,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu strict_warn= save_CXXFLAGS="$CXXFLAGS" -for real_option in -Wmissing-format-attribute; do - # Do the check with the no- prefix removed since gcc silently - # accepts any -Wno-* option on purpose - case $real_option in - -Wno-*) option=-W`expr x$real_option : 'x-Wno-\(.*\)'` ;; - *) option=$real_option ;; - esac - as_acx_Woption=`$as_echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh` - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports $option" >&5 -$as_echo_n "checking whether $CXX supports $option... " >&6; } -if { as_var=$as_acx_Woption; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - CXXFLAGS="$option" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - eval "$as_acx_Woption=yes" -else - eval "$as_acx_Woption=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -eval ac_res=\$$as_acx_Woption - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - if test `eval 'as_val=${'$as_acx_Woption'};$as_echo "$as_val"'` = yes; then : - strict_warn="$strict_warn${strict_warn:+ }$real_option" -fi - done -CXXFLAGS="$save_CXXFLAGS" -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - -save_CXXFLAGS="$CXXFLAGS" -for real_option in -Woverloaded-virtual; do +for real_option in -Wmissing-format-attribute -Woverloaded-virtual; do # Do the check with the no- prefix removed since gcc silently # accepts any -Wno-* option on purpose case $real_option in @@ -18479,7 +18423,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 18482 "configure" +#line 18426 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -18585,7 +18529,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 18588 "configure" +#line 18532 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/gcc/configure.ac b/gcc/configure.ac index fa789d529d7..338956f644a 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -476,14 +476,14 @@ AC_ARG_ENABLE(build-format-warnings, AS_IF([test $enable_build_format_warnings = no], [wf_opt=-Wno-format],[wf_opt=]) ACX_PROG_CXX_WARNING_OPTS( - m4_quote(m4_do([-W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual $wf_opt])), [loose_warn]) + m4_quote(m4_do([-W -Wall -Wno-narrowing -Wwrite-strings ], + [-Wcast-qual $wf_opt])), [loose_warn]) ACX_PROG_CC_WARNING_OPTS( m4_quote(m4_do([-Wstrict-prototypes -Wmissing-prototypes])), [c_loose_warn]) ACX_PROG_CXX_WARNING_OPTS( - m4_quote(m4_do([-Wmissing-format-attribute])), [strict_warn]) -ACX_PROG_CXX_WARNING_OPTS( - m4_quote(m4_do([-Woverloaded-virtual])), [strict_warn]) + m4_quote(m4_do([-Wmissing-format-attribute ], + [-Woverloaded-virtual])), [strict_warn]) ACX_PROG_CC_WARNING_OPTS( m4_quote(m4_do([-Wold-style-definition -Wc++-compat])), [c_strict_warn]) ACX_PROG_CXX_WARNING_ALMOST_PEDANTIC(