Hello,

The configure scripts check for -Wno-narrowing, but GCC ignores rather
than rejects unknown -Wno-* warnings.

Fixed by checking for the positive warning, -Wnarrowing.

OK for trunk?

Ciao!
Steven
gcc/
        PR bootstrap/51388
        configure.ac: Check for Wnarrowing instead of Wno-narrowing.
        configure: Regenerate.

libcpp/
        PR bootstrap/51388
        configure.ac: Check for Wnarrowing instead of Wno-narrowing.
        configure: Regenerate.

Index: gcc/configure
===================================================================
--- gcc/configure       (revision 182207)
+++ gcc/configure       (working copy)
@@ -6400,7 +6400,7 @@ fi
 
 loose_warn=
 save_CFLAGS="$CFLAGS"
-for option in -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual; do
+for option in -W -Wall -Wnarrowing -Wwrite-strings -Wcast-qual; do
   as_acx_Woption=`$as_echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh`
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports 
$option" >&5
Index: gcc/configure.ac
===================================================================
--- gcc/configure.ac    (revision 182207)
+++ gcc/configure.ac    (working copy)
@@ -333,7 +333,7 @@ GCC_STDINT_TYPES
 # So, we only use -pedantic if we can disable those warnings.
 
 ACX_PROG_CC_WARNING_OPTS(
-       m4_quote(m4_do([-W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual])), 
[loose_warn])
+       m4_quote(m4_do([-W -Wall -Wnarrowing -Wwrite-strings -Wcast-qual])), 
[loose_warn])
 ACX_PROG_CC_WARNING_OPTS(
        m4_quote(m4_do([-Wstrict-prototypes -Wmissing-prototypes])),
        [c_loose_warn])
Index: libcpp/configure
===================================================================
--- libcpp/configure    (revision 182207)
+++ libcpp/configure    (working copy)
@@ -4688,7 +4688,7 @@ test -n "$AUTOHEADER" || AUTOHEADER="$MI
 
 warn=
 save_CFLAGS="$CFLAGS"
-for option in -W -Wall -Wno-narrowing -Wwrite-strings \
+for option in -W -Wall -Wnarrowing -Wwrite-strings \
                          -Wmissing-format-attribute; do
   as_acx_Woption=`$as_echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh`
 
Index: libcpp/configure.ac
===================================================================
--- libcpp/configure.ac (revision 182207)
+++ libcpp/configure.ac (working copy)
@@ -33,7 +33,7 @@ AC_CHECK_PROGS([AUTOHEADER], [autoheader
 # Figure out what compiler warnings we can enable.
 # See config/warnings.m4 for details.
 
-ACX_PROG_CC_WARNING_OPTS([-W -Wall -Wno-narrowing -Wwrite-strings \
+ACX_PROG_CC_WARNING_OPTS([-W -Wall -Wnarrowing -Wwrite-strings \
                          -Wmissing-format-attribute], [warn])
 ACX_PROG_CC_WARNING_OPTS([-Wstrict-prototypes -Wmissing-prototypes \
                          -Wold-style-definition -Wc++-compat], [c_warn])

Reply via email to