diff options
author | Nathanael Nerode <neroden@gcc.gnu.org> | 2004-03-24 18:03:46 +0000 |
---|---|---|
committer | Nathanael Nerode <neroden@gcc.gnu.org> | 2004-03-24 18:03:46 +0000 |
commit | 643d3bd23efc1efa1d64147d0f777e4f0b38dac1 (patch) | |
tree | cf57e5398fd7fe424fc50528e9ff56c55109223f /gcc/configure.ac | |
parent | 5848830fc3e626e6aa12c7f31620817b114b9b28 (diff) | |
download | gcc-643d3bd23efc1efa1d64147d0f777e4f0b38dac1.zip gcc-643d3bd23efc1efa1d64147d0f777e4f0b38dac1.tar.gz gcc-643d3bd23efc1efa1d64147d0f777e4f0b38dac1.tar.bz2 |
Makefile.in (STRICT2_WARN): Reorder.
2004-03-24 Nathanael Nerode <neroden@gcc.gnu.org>
* Makefile.in (STRICT2_WARN): Reorder.
* configure.ac: Check for -Wold-style-definition, and use it
in strict1_warn if it's available.
* configure: Regnerate.
From-SVN: r79922
Diffstat (limited to 'gcc/configure.ac')
-rw-r--r-- | gcc/configure.ac | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/configure.ac b/gcc/configure.ac index 9a9318e..7a4f790 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -331,6 +331,21 @@ if test $ac_cv_prog_cc_w_no_long_long = yes \ fi AC_SUBST(strict1_warn) +# Add -Wold-style-definition if it's accepted +AC_CACHE_CHECK( + [whether ${CC} accepts -Wold-style-definition], + [ac_cv_prog_cc_w_old_style_definition], + [save_CFLAGS="$CFLAGS" + CFLAGS="-Wold-style-definition" + AC_COMPILE_IFELSE([AC_LANG_SOURCE([[]])], + [ac_cv_prog_cc_w_old_style_definition=yes], + [ac_cv_prog_cc_w_old_style_definition=no]) + CFLAGS="$save_CFLAGS" + ]) +if test $ac_cv_prog_cc_w_old_style_definition = yes ; then + strict1_warn="${strict1_warn} -Wold-style-definition" +fi + # 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'. |