diff options
author | ghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-07-24 03:39:23 +0000 |
---|---|---|
committer | ghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-07-24 03:39:23 +0000 |
commit | 3df48165b81ecf2b2f9ab7af7904f5f609fc9ea1 (patch) | |
tree | 194da3a00d4ac85c633617f0842a6b6fd04e781f /gcc/configure.ac | |
parent | 02a134cbf4da41ca1a355aababe546fb752cceee (diff) | |
download | gcc-3df48165b81ecf2b2f9ab7af7904f5f609fc9ea1.tar.gz |
* Makefile.in (STRICT2_WARN): Add -Wmissing-format-attribute.
* configure.ac: Check for -Wmissing-format-attribute.
* configure: Regenerate.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@102326 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/configure.ac')
-rw-r--r-- | gcc/configure.ac | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/gcc/configure.ac b/gcc/configure.ac index 00a531f1241..9cc51d5c99f 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -330,7 +330,6 @@ if test $ac_cv_prog_cc_w_no_long_long = yes \ && test $ac_cv_prog_cc_w_no_variadic_macros = yes ; then strict1_warn="-pedantic -Wno-long-long -Wno-variadic-macros" fi -AC_SUBST(strict1_warn) # Add -Wold-style-definition if it's accepted AC_CACHE_CHECK( @@ -347,6 +346,21 @@ if test $ac_cv_prog_cc_w_old_style_definition = yes ; then strict1_warn="${strict1_warn} -Wold-style-definition" fi +# Add -Wmissing-format-attribute if it's accepted +AC_CACHE_CHECK( + [whether ${CC} accepts -Wmissing-format-attribute], + [ac_cv_prog_cc_w_missing_format_attribute], + [save_CFLAGS="$CFLAGS" + CFLAGS="-Wmissing-format-attribute" + AC_COMPILE_IFELSE([AC_LANG_SOURCE([[]])], + [ac_cv_prog_cc_w_missing_format_attribute=yes], + [ac_cv_prog_cc_w_missing_format_attribute=no]) + CFLAGS="$save_CFLAGS" + ]) +if test $ac_cv_prog_cc_w_missing_format_attribute = yes ; then + strict1_warn="${strict1_warn} -Wmissing-format-attribute" +fi + # Enable -Werror, period. AC_ARG_ENABLE(werror_always, [ --enable-werror-always enable -Werror always], [], @@ -356,6 +370,8 @@ if test x${enable_werror_always} = xyes ; then WERROR=-Werror fi +AC_SUBST(strict1_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'. |