]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Makefile.in (STRICT2_WARN): Reorder.
authorNathanael Nerode <neroden@gcc.gnu.org>
Wed, 24 Mar 2004 18:03:46 +0000 (18:03 +0000)
committerNathanael Nerode <neroden@gcc.gnu.org>
Wed, 24 Mar 2004 18:03:46 +0000 (18:03 +0000)
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

gcc/ChangeLog
gcc/Makefile.in
gcc/configure
gcc/configure.ac

index f6c465078e02c245012e6e956feb083ae855c8e3..63b98481716ba71f68b70fc486159369371c26ca 100644 (file)
@@ -1,3 +1,10 @@
+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.
+
 2004-03-24  Paul Brook  <paul@nowt.org>
 
        * config.gcc <arm>: Add --with-abi=
index c08d18b6738e6a80af50011758e78c02d72fd1f7..95f04975f44efbb8a57e76d2004751f5c4b031f2 100644 (file)
@@ -163,8 +163,8 @@ coverageexts = .{gcda,gcno}
 # -Wno-variadic-macros.
 LOOSE_WARN = -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
 STRICT_WARN = @strict1_warn@
-STRICT2_WARN = -pedantic -Wno-long-long -Wold-style-definition \
-  -Wno-variadic-macros @WERROR@
+STRICT2_WARN = -pedantic -Wno-long-long -Wno-variadic-macros \
+  -Wold-style-definition @WERROR@
 
 # This is set by --enable-checking.  The idea is to catch forgotten
 # "extern" tags in header files.
index 840eae3d38b259e258270101c510277b5fa671eb..54fac9706c9f0d94171547fab1d8b1a7339fa62e 100755 (executable)
@@ -3840,6 +3840,60 @@ if test $ac_cv_prog_cc_w_no_long_long = yes \
 fi
 
 
+# Add -Wold-style-definition if it's accepted
+echo "$as_me:$LINENO: checking whether ${CC} accepts -Wold-style-definition" >&5
+echo $ECHO_N "checking whether ${CC} accepts -Wold-style-definition... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_w_old_style_definition+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  save_CFLAGS="$CFLAGS"
+  CFLAGS="-Wold-style-definition"
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_prog_cc_w_old_style_definition=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_prog_cc_w_old_style_definition=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  CFLAGS="$save_CFLAGS"
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_old_style_definition" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_w_old_style_definition" >&6
+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'.
@@ -5193,7 +5247,7 @@ if test "${gcc_cv_prog_makeinfo_modern+set}" = set; then
 else
     ac_prog_version=`$MAKEINFO --version 2>&1 |
                    sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
-  echo "configure:5196: version of makeinfo is $ac_prog_version" >&5
+  echo "configure:5250: version of makeinfo is $ac_prog_version" >&5
   case $ac_prog_version in
     '')     gcc_cv_prog_makeinfo_modern=no;;
     4.[2-9]*)
index 9a9318e81efab668e40dfaa123286f259bd0ab22..7a4f79056628df06e544fe8dd7208aafead8ddec 100644 (file)
@@ -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'.