commit:     c5e463c86b6c13534b017a26b20a2361e4acc4aa
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 27 08:50:23 2026 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Tue Jan 27 08:50:23 2026 +0000
URL:        https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=c5e463c8

configure: add -Wdiscarded-qualifiers to WCFLAGS and sort the list

Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>

 configure    | 346 +++++++++++++++++++++++++++++++++--------------------------
 configure.ac |  26 ++---
 2 files changed, 208 insertions(+), 164 deletions(-)

diff --git a/configure b/configure
index cb4b1ae2..7cbed63f 100755
--- a/configure
+++ b/configure
@@ -31600,11 +31600,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 
-# -Wno-sign-compare   gnulib stat-time.h :(
 
-       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C 
compiler accepts -Wunused" >&5
-printf %s "checking whether the C compiler accepts -Wunused... " >&6; }
-if test ${ax_cv_check_cflags___Wunused+y}
+       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C 
compiler accepts -Wbad-function-cast" >&5
+printf %s "checking whether the C compiler accepts -Wbad-function-cast... " 
>&6; }
+if test ${ax_cv_check_cflags___Wbad_function_cast+y}
 then :
   printf %s "(cached) " >&6
 else case e in #(
@@ -31613,7 +31612,7 @@ else case e in #(
   if test x"$GCC" = xyes ; then
     add_gnu_werror="-Werror"
   fi
-  CFLAGS="$CFLAGS  -Wunused $add_gnu_werror"
+  CFLAGS="$CFLAGS  -Wbad-function-cast $add_gnu_werror"
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -31627,29 +31626,29 @@ main (void)
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
-  ax_cv_check_cflags___Wunused=yes
+  ax_cv_check_cflags___Wbad_function_cast=yes
 else case e in #(
-  e) ax_cv_check_cflags___Wunused=no ;;
+  e) ax_cv_check_cflags___Wbad_function_cast=no ;;
 esac
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
   CFLAGS=$ax_check_save_flags ;;
 esac
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: 
$ax_cv_check_cflags___Wunused" >&5
-printf "%s\n" "$ax_cv_check_cflags___Wunused" >&6; }
-if test "x$ax_cv_check_cflags___Wunused" = xyes
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: 
$ax_cv_check_cflags___Wbad_function_cast" >&5
+printf "%s\n" "$ax_cv_check_cflags___Wbad_function_cast" >&6; }
+if test "x$ax_cv_check_cflags___Wbad_function_cast" = xyes
 then :
-  as_fn_append CWFLAGS " -Wunused"
+  as_fn_append CWFLAGS " -Wbad-function-cast"
 else case e in #(
   e) : ;;
 esac
 fi
 
 
-       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C 
compiler accepts -Wimplicit" >&5
-printf %s "checking whether the C compiler accepts -Wimplicit... " >&6; }
-if test ${ax_cv_check_cflags___Wimplicit+y}
+       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C 
compiler accepts -Wcast-align" >&5
+printf %s "checking whether the C compiler accepts -Wcast-align... " >&6; }
+if test ${ax_cv_check_cflags___Wcast_align+y}
 then :
   printf %s "(cached) " >&6
 else case e in #(
@@ -31658,7 +31657,7 @@ else case e in #(
   if test x"$GCC" = xyes ; then
     add_gnu_werror="-Werror"
   fi
-  CFLAGS="$CFLAGS  -Wimplicit $add_gnu_werror"
+  CFLAGS="$CFLAGS  -Wcast-align $add_gnu_werror"
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -31672,29 +31671,29 @@ main (void)
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
-  ax_cv_check_cflags___Wimplicit=yes
+  ax_cv_check_cflags___Wcast_align=yes
 else case e in #(
-  e) ax_cv_check_cflags___Wimplicit=no ;;
+  e) ax_cv_check_cflags___Wcast_align=no ;;
 esac
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
   CFLAGS=$ax_check_save_flags ;;
 esac
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: 
$ax_cv_check_cflags___Wimplicit" >&5
-printf "%s\n" "$ax_cv_check_cflags___Wimplicit" >&6; }
-if test "x$ax_cv_check_cflags___Wimplicit" = xyes
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: 
$ax_cv_check_cflags___Wcast_align" >&5
+printf "%s\n" "$ax_cv_check_cflags___Wcast_align" >&6; }
+if test "x$ax_cv_check_cflags___Wcast_align" = xyes
 then :
-  as_fn_append CWFLAGS " -Wimplicit"
+  as_fn_append CWFLAGS " -Wcast-align"
 else case e in #(
   e) : ;;
 esac
 fi
 
 
-       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C 
compiler accepts -Wshadow" >&5
-printf %s "checking whether the C compiler accepts -Wshadow... " >&6; }
-if test ${ax_cv_check_cflags___Wshadow+y}
+       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C 
compiler accepts -Wchar-subscripts" >&5
+printf %s "checking whether the C compiler accepts -Wchar-subscripts... " >&6; 
}
+if test ${ax_cv_check_cflags___Wchar_subscripts+y}
 then :
   printf %s "(cached) " >&6
 else case e in #(
@@ -31703,7 +31702,7 @@ else case e in #(
   if test x"$GCC" = xyes ; then
     add_gnu_werror="-Werror"
   fi
-  CFLAGS="$CFLAGS  -Wshadow $add_gnu_werror"
+  CFLAGS="$CFLAGS  -Wchar-subscripts $add_gnu_werror"
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -31717,29 +31716,29 @@ main (void)
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
-  ax_cv_check_cflags___Wshadow=yes
+  ax_cv_check_cflags___Wchar_subscripts=yes
 else case e in #(
-  e) ax_cv_check_cflags___Wshadow=no ;;
+  e) ax_cv_check_cflags___Wchar_subscripts=no ;;
 esac
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
   CFLAGS=$ax_check_save_flags ;;
 esac
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: 
$ax_cv_check_cflags___Wshadow" >&5
-printf "%s\n" "$ax_cv_check_cflags___Wshadow" >&6; }
-if test "x$ax_cv_check_cflags___Wshadow" = xyes
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: 
$ax_cv_check_cflags___Wchar_subscripts" >&5
+printf "%s\n" "$ax_cv_check_cflags___Wchar_subscripts" >&6; }
+if test "x$ax_cv_check_cflags___Wchar_subscripts" = xyes
 then :
-  as_fn_append CWFLAGS " -Wshadow"
+  as_fn_append CWFLAGS " -Wchar-subscripts"
 else case e in #(
   e) : ;;
 esac
 fi
 
 
-       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C 
compiler accepts -Wformat=2" >&5
-printf %s "checking whether the C compiler accepts -Wformat=2... " >&6; }
-if test ${ax_cv_check_cflags___Wformat_2+y}
+       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C 
compiler accepts -Wcomment" >&5
+printf %s "checking whether the C compiler accepts -Wcomment... " >&6; }
+if test ${ax_cv_check_cflags___Wcomment+y}
 then :
   printf %s "(cached) " >&6
 else case e in #(
@@ -31748,7 +31747,7 @@ else case e in #(
   if test x"$GCC" = xyes ; then
     add_gnu_werror="-Werror"
   fi
-  CFLAGS="$CFLAGS  -Wformat=2 $add_gnu_werror"
+  CFLAGS="$CFLAGS  -Wcomment $add_gnu_werror"
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -31762,29 +31761,29 @@ main (void)
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
-  ax_cv_check_cflags___Wformat_2=yes
+  ax_cv_check_cflags___Wcomment=yes
 else case e in #(
-  e) ax_cv_check_cflags___Wformat_2=no ;;
+  e) ax_cv_check_cflags___Wcomment=no ;;
 esac
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
   CFLAGS=$ax_check_save_flags ;;
 esac
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: 
$ax_cv_check_cflags___Wformat_2" >&5
-printf "%s\n" "$ax_cv_check_cflags___Wformat_2" >&6; }
-if test "x$ax_cv_check_cflags___Wformat_2" = xyes
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: 
$ax_cv_check_cflags___Wcomment" >&5
+printf "%s\n" "$ax_cv_check_cflags___Wcomment" >&6; }
+if test "x$ax_cv_check_cflags___Wcomment" = xyes
 then :
-  as_fn_append CWFLAGS " -Wformat=2"
+  as_fn_append CWFLAGS " -Wcomment"
 else case e in #(
   e) : ;;
 esac
 fi
 
 
-       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C 
compiler accepts -Wmissing-declarations" >&5
-printf %s "checking whether the C compiler accepts -Wmissing-declarations... " 
>&6; }
-if test ${ax_cv_check_cflags___Wmissing_declarations+y}
+       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C 
compiler accepts -Wdiscarded-qualifiers" >&5
+printf %s "checking whether the C compiler accepts -Wdiscarded-qualifiers... " 
>&6; }
+if test ${ax_cv_check_cflags___Wdiscarded_qualifiers+y}
 then :
   printf %s "(cached) " >&6
 else case e in #(
@@ -31793,7 +31792,7 @@ else case e in #(
   if test x"$GCC" = xyes ; then
     add_gnu_werror="-Werror"
   fi
-  CFLAGS="$CFLAGS  -Wmissing-declarations $add_gnu_werror"
+  CFLAGS="$CFLAGS  -Wdiscarded-qualifiers $add_gnu_werror"
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -31807,29 +31806,29 @@ main (void)
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
-  ax_cv_check_cflags___Wmissing_declarations=yes
+  ax_cv_check_cflags___Wdiscarded_qualifiers=yes
 else case e in #(
-  e) ax_cv_check_cflags___Wmissing_declarations=no ;;
+  e) ax_cv_check_cflags___Wdiscarded_qualifiers=no ;;
 esac
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
   CFLAGS=$ax_check_save_flags ;;
 esac
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: 
$ax_cv_check_cflags___Wmissing_declarations" >&5
-printf "%s\n" "$ax_cv_check_cflags___Wmissing_declarations" >&6; }
-if test "x$ax_cv_check_cflags___Wmissing_declarations" = xyes
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: 
$ax_cv_check_cflags___Wdiscarded_qualifiers" >&5
+printf "%s\n" "$ax_cv_check_cflags___Wdiscarded_qualifiers" >&6; }
+if test "x$ax_cv_check_cflags___Wdiscarded_qualifiers" = xyes
 then :
-  as_fn_append CWFLAGS " -Wmissing-declarations"
+  as_fn_append CWFLAGS " -Wdiscarded-qualifiers"
 else case e in #(
   e) : ;;
 esac
 fi
 
 
-       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C 
compiler accepts -Wwrite-strings" >&5
-printf %s "checking whether the C compiler accepts -Wwrite-strings... " >&6; }
-if test ${ax_cv_check_cflags___Wwrite_strings+y}
+       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C 
compiler accepts -Wextra" >&5
+printf %s "checking whether the C compiler accepts -Wextra... " >&6; }
+if test ${ax_cv_check_cflags___Wextra+y}
 then :
   printf %s "(cached) " >&6
 else case e in #(
@@ -31838,7 +31837,7 @@ else case e in #(
   if test x"$GCC" = xyes ; then
     add_gnu_werror="-Werror"
   fi
-  CFLAGS="$CFLAGS  -Wwrite-strings $add_gnu_werror"
+  CFLAGS="$CFLAGS  -Wextra $add_gnu_werror"
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -31852,29 +31851,29 @@ main (void)
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
-  ax_cv_check_cflags___Wwrite_strings=yes
+  ax_cv_check_cflags___Wextra=yes
 else case e in #(
-  e) ax_cv_check_cflags___Wwrite_strings=no ;;
+  e) ax_cv_check_cflags___Wextra=no ;;
 esac
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
   CFLAGS=$ax_check_save_flags ;;
 esac
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: 
$ax_cv_check_cflags___Wwrite_strings" >&5
-printf "%s\n" "$ax_cv_check_cflags___Wwrite_strings" >&6; }
-if test "x$ax_cv_check_cflags___Wwrite_strings" = xyes
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: 
$ax_cv_check_cflags___Wextra" >&5
+printf "%s\n" "$ax_cv_check_cflags___Wextra" >&6; }
+if test "x$ax_cv_check_cflags___Wextra" = xyes
 then :
-  as_fn_append CWFLAGS " -Wwrite-strings"
+  as_fn_append CWFLAGS " -Wextra"
 else case e in #(
   e) : ;;
 esac
 fi
 
 
-       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C 
compiler accepts -Wbad-function-cast" >&5
-printf %s "checking whether the C compiler accepts -Wbad-function-cast... " 
>&6; }
-if test ${ax_cv_check_cflags___Wbad_function_cast+y}
+       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C 
compiler accepts -Wformat=2" >&5
+printf %s "checking whether the C compiler accepts -Wformat=2... " >&6; }
+if test ${ax_cv_check_cflags___Wformat_2+y}
 then :
   printf %s "(cached) " >&6
 else case e in #(
@@ -31883,7 +31882,7 @@ else case e in #(
   if test x"$GCC" = xyes ; then
     add_gnu_werror="-Werror"
   fi
-  CFLAGS="$CFLAGS  -Wbad-function-cast $add_gnu_werror"
+  CFLAGS="$CFLAGS  -Wformat=2 $add_gnu_werror"
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -31897,29 +31896,29 @@ main (void)
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
-  ax_cv_check_cflags___Wbad_function_cast=yes
+  ax_cv_check_cflags___Wformat_2=yes
 else case e in #(
-  e) ax_cv_check_cflags___Wbad_function_cast=no ;;
+  e) ax_cv_check_cflags___Wformat_2=no ;;
 esac
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
   CFLAGS=$ax_check_save_flags ;;
 esac
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: 
$ax_cv_check_cflags___Wbad_function_cast" >&5
-printf "%s\n" "$ax_cv_check_cflags___Wbad_function_cast" >&6; }
-if test "x$ax_cv_check_cflags___Wbad_function_cast" = xyes
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: 
$ax_cv_check_cflags___Wformat_2" >&5
+printf "%s\n" "$ax_cv_check_cflags___Wformat_2" >&6; }
+if test "x$ax_cv_check_cflags___Wformat_2" = xyes
 then :
-  as_fn_append CWFLAGS " -Wbad-function-cast"
+  as_fn_append CWFLAGS " -Wformat=2"
 else case e in #(
   e) : ;;
 esac
 fi
 
 
-       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C 
compiler accepts -Wnested-externs" >&5
-printf %s "checking whether the C compiler accepts -Wnested-externs... " >&6; }
-if test ${ax_cv_check_cflags___Wnested_externs+y}
+       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C 
compiler accepts -Wimplicit" >&5
+printf %s "checking whether the C compiler accepts -Wimplicit... " >&6; }
+if test ${ax_cv_check_cflags___Wimplicit+y}
 then :
   printf %s "(cached) " >&6
 else case e in #(
@@ -31928,7 +31927,7 @@ else case e in #(
   if test x"$GCC" = xyes ; then
     add_gnu_werror="-Werror"
   fi
-  CFLAGS="$CFLAGS  -Wnested-externs $add_gnu_werror"
+  CFLAGS="$CFLAGS  -Wimplicit $add_gnu_werror"
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -31942,29 +31941,29 @@ main (void)
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
-  ax_cv_check_cflags___Wnested_externs=yes
+  ax_cv_check_cflags___Wimplicit=yes
 else case e in #(
-  e) ax_cv_check_cflags___Wnested_externs=no ;;
+  e) ax_cv_check_cflags___Wimplicit=no ;;
 esac
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
   CFLAGS=$ax_check_save_flags ;;
 esac
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: 
$ax_cv_check_cflags___Wnested_externs" >&5
-printf "%s\n" "$ax_cv_check_cflags___Wnested_externs" >&6; }
-if test "x$ax_cv_check_cflags___Wnested_externs" = xyes
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: 
$ax_cv_check_cflags___Wimplicit" >&5
+printf "%s\n" "$ax_cv_check_cflags___Wimplicit" >&6; }
+if test "x$ax_cv_check_cflags___Wimplicit" = xyes
 then :
-  as_fn_append CWFLAGS " -Wnested-externs"
+  as_fn_append CWFLAGS " -Wimplicit"
 else case e in #(
   e) : ;;
 esac
 fi
 
 
-       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C 
compiler accepts -Wcomment" >&5
-printf %s "checking whether the C compiler accepts -Wcomment... " >&6; }
-if test ${ax_cv_check_cflags___Wcomment+y}
+       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C 
compiler accepts -Winline" >&5
+printf %s "checking whether the C compiler accepts -Winline... " >&6; }
+if test ${ax_cv_check_cflags___Winline+y}
 then :
   printf %s "(cached) " >&6
 else case e in #(
@@ -31973,7 +31972,7 @@ else case e in #(
   if test x"$GCC" = xyes ; then
     add_gnu_werror="-Werror"
   fi
-  CFLAGS="$CFLAGS  -Wcomment $add_gnu_werror"
+  CFLAGS="$CFLAGS  -Winline $add_gnu_werror"
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -31987,29 +31986,29 @@ main (void)
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
-  ax_cv_check_cflags___Wcomment=yes
+  ax_cv_check_cflags___Winline=yes
 else case e in #(
-  e) ax_cv_check_cflags___Wcomment=no ;;
+  e) ax_cv_check_cflags___Winline=no ;;
 esac
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
   CFLAGS=$ax_check_save_flags ;;
 esac
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: 
$ax_cv_check_cflags___Wcomment" >&5
-printf "%s\n" "$ax_cv_check_cflags___Wcomment" >&6; }
-if test "x$ax_cv_check_cflags___Wcomment" = xyes
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: 
$ax_cv_check_cflags___Winline" >&5
+printf "%s\n" "$ax_cv_check_cflags___Winline" >&6; }
+if test "x$ax_cv_check_cflags___Winline" = xyes
 then :
-  as_fn_append CWFLAGS " -Wcomment"
+  as_fn_append CWFLAGS " -Winline"
 else case e in #(
   e) : ;;
 esac
 fi
 
 
-       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C 
compiler accepts -Winline" >&5
-printf %s "checking whether the C compiler accepts -Winline... " >&6; }
-if test ${ax_cv_check_cflags___Winline+y}
+       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C 
compiler accepts -Wmissing-declarations" >&5
+printf %s "checking whether the C compiler accepts -Wmissing-declarations... " 
>&6; }
+if test ${ax_cv_check_cflags___Wmissing_declarations+y}
 then :
   printf %s "(cached) " >&6
 else case e in #(
@@ -32018,7 +32017,7 @@ else case e in #(
   if test x"$GCC" = xyes ; then
     add_gnu_werror="-Werror"
   fi
-  CFLAGS="$CFLAGS  -Winline $add_gnu_werror"
+  CFLAGS="$CFLAGS  -Wmissing-declarations $add_gnu_werror"
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -32032,29 +32031,29 @@ main (void)
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
-  ax_cv_check_cflags___Winline=yes
+  ax_cv_check_cflags___Wmissing_declarations=yes
 else case e in #(
-  e) ax_cv_check_cflags___Winline=no ;;
+  e) ax_cv_check_cflags___Wmissing_declarations=no ;;
 esac
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
   CFLAGS=$ax_check_save_flags ;;
 esac
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: 
$ax_cv_check_cflags___Winline" >&5
-printf "%s\n" "$ax_cv_check_cflags___Winline" >&6; }
-if test "x$ax_cv_check_cflags___Winline" = xyes
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: 
$ax_cv_check_cflags___Wmissing_declarations" >&5
+printf "%s\n" "$ax_cv_check_cflags___Wmissing_declarations" >&6; }
+if test "x$ax_cv_check_cflags___Wmissing_declarations" = xyes
 then :
-  as_fn_append CWFLAGS " -Winline"
+  as_fn_append CWFLAGS " -Wmissing-declarations"
 else case e in #(
   e) : ;;
 esac
 fi
 
 
-       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C 
compiler accepts -Wchar-subscripts" >&5
-printf %s "checking whether the C compiler accepts -Wchar-subscripts... " >&6; 
}
-if test ${ax_cv_check_cflags___Wchar_subscripts+y}
+       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C 
compiler accepts -Wnested-externs" >&5
+printf %s "checking whether the C compiler accepts -Wnested-externs... " >&6; }
+if test ${ax_cv_check_cflags___Wnested_externs+y}
 then :
   printf %s "(cached) " >&6
 else case e in #(
@@ -32063,7 +32062,7 @@ else case e in #(
   if test x"$GCC" = xyes ; then
     add_gnu_werror="-Werror"
   fi
-  CFLAGS="$CFLAGS  -Wchar-subscripts $add_gnu_werror"
+  CFLAGS="$CFLAGS  -Wnested-externs $add_gnu_werror"
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -32077,29 +32076,29 @@ main (void)
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
-  ax_cv_check_cflags___Wchar_subscripts=yes
+  ax_cv_check_cflags___Wnested_externs=yes
 else case e in #(
-  e) ax_cv_check_cflags___Wchar_subscripts=no ;;
+  e) ax_cv_check_cflags___Wnested_externs=no ;;
 esac
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
   CFLAGS=$ax_check_save_flags ;;
 esac
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: 
$ax_cv_check_cflags___Wchar_subscripts" >&5
-printf "%s\n" "$ax_cv_check_cflags___Wchar_subscripts" >&6; }
-if test "x$ax_cv_check_cflags___Wchar_subscripts" = xyes
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: 
$ax_cv_check_cflags___Wnested_externs" >&5
+printf "%s\n" "$ax_cv_check_cflags___Wnested_externs" >&6; }
+if test "x$ax_cv_check_cflags___Wnested_externs" = xyes
 then :
-  as_fn_append CWFLAGS " -Wchar-subscripts"
+  as_fn_append CWFLAGS " -Wnested-externs"
 else case e in #(
   e) : ;;
 esac
 fi
 
 
-       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C 
compiler accepts -Wcast-align" >&5
-printf %s "checking whether the C compiler accepts -Wcast-align... " >&6; }
-if test ${ax_cv_check_cflags___Wcast_align+y}
+       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C 
compiler accepts -Wno-sign-compare" >&5
+printf %s "checking whether the C compiler accepts -Wno-sign-compare... " >&6; 
}
+if test ${ax_cv_check_cflags___Wno_sign_compare+y}
 then :
   printf %s "(cached) " >&6
 else case e in #(
@@ -32108,7 +32107,7 @@ else case e in #(
   if test x"$GCC" = xyes ; then
     add_gnu_werror="-Werror"
   fi
-  CFLAGS="$CFLAGS  -Wcast-align $add_gnu_werror"
+  CFLAGS="$CFLAGS  -Wno-sign-compare $add_gnu_werror"
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -32122,20 +32121,65 @@ main (void)
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
-  ax_cv_check_cflags___Wcast_align=yes
+  ax_cv_check_cflags___Wno_sign_compare=yes
 else case e in #(
-  e) ax_cv_check_cflags___Wcast_align=no ;;
+  e) ax_cv_check_cflags___Wno_sign_compare=no ;;
 esac
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
   CFLAGS=$ax_check_save_flags ;;
 esac
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: 
$ax_cv_check_cflags___Wcast_align" >&5
-printf "%s\n" "$ax_cv_check_cflags___Wcast_align" >&6; }
-if test "x$ax_cv_check_cflags___Wcast_align" = xyes
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: 
$ax_cv_check_cflags___Wno_sign_compare" >&5
+printf "%s\n" "$ax_cv_check_cflags___Wno_sign_compare" >&6; }
+if test "x$ax_cv_check_cflags___Wno_sign_compare" = xyes
 then :
-  as_fn_append CWFLAGS " -Wcast-align"
+  as_fn_append CWFLAGS " -Wno-sign-compare"
+else case e in #(
+  e) : ;;
+esac
+fi
+
+
+       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C 
compiler accepts -Wold-style-definition" >&5
+printf %s "checking whether the C compiler accepts -Wold-style-definition... " 
>&6; }
+if test ${ax_cv_check_cflags___Wold_style_definition+y}
+then :
+  printf %s "(cached) " >&6
+else case e in #(
+  e)
+  ax_check_save_flags=$CFLAGS
+  if test x"$GCC" = xyes ; then
+    add_gnu_werror="-Werror"
+  fi
+  CFLAGS="$CFLAGS  -Wold-style-definition $add_gnu_werror"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main (void)
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  ax_cv_check_cflags___Wold_style_definition=yes
+else case e in #(
+  e) ax_cv_check_cflags___Wold_style_definition=no ;;
+esac
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+  CFLAGS=$ax_check_save_flags ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: 
$ax_cv_check_cflags___Wold_style_definition" >&5
+printf "%s\n" "$ax_cv_check_cflags___Wold_style_definition" >&6; }
+if test "x$ax_cv_check_cflags___Wold_style_definition" = xyes
+then :
+  as_fn_append CWFLAGS " -Wold-style-definition"
 else case e in #(
   e) : ;;
 esac
@@ -32187,9 +32231,9 @@ esac
 fi
 
 
-       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C 
compiler accepts -Wold-style-definition" >&5
-printf %s "checking whether the C compiler accepts -Wold-style-definition... " 
>&6; }
-if test ${ax_cv_check_cflags___Wold_style_definition+y}
+       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C 
compiler accepts -Wshadow" >&5
+printf %s "checking whether the C compiler accepts -Wshadow... " >&6; }
+if test ${ax_cv_check_cflags___Wshadow+y}
 then :
   printf %s "(cached) " >&6
 else case e in #(
@@ -32198,7 +32242,7 @@ else case e in #(
   if test x"$GCC" = xyes ; then
     add_gnu_werror="-Werror"
   fi
-  CFLAGS="$CFLAGS  -Wold-style-definition $add_gnu_werror"
+  CFLAGS="$CFLAGS  -Wshadow $add_gnu_werror"
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -32212,29 +32256,29 @@ main (void)
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
-  ax_cv_check_cflags___Wold_style_definition=yes
+  ax_cv_check_cflags___Wshadow=yes
 else case e in #(
-  e) ax_cv_check_cflags___Wold_style_definition=no ;;
+  e) ax_cv_check_cflags___Wshadow=no ;;
 esac
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
   CFLAGS=$ax_check_save_flags ;;
 esac
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: 
$ax_cv_check_cflags___Wold_style_definition" >&5
-printf "%s\n" "$ax_cv_check_cflags___Wold_style_definition" >&6; }
-if test "x$ax_cv_check_cflags___Wold_style_definition" = xyes
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: 
$ax_cv_check_cflags___Wshadow" >&5
+printf "%s\n" "$ax_cv_check_cflags___Wshadow" >&6; }
+if test "x$ax_cv_check_cflags___Wshadow" = xyes
 then :
-  as_fn_append CWFLAGS " -Wold-style-definition"
+  as_fn_append CWFLAGS " -Wshadow"
 else case e in #(
   e) : ;;
 esac
 fi
 
 
-       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C 
compiler accepts -Wextra" >&5
-printf %s "checking whether the C compiler accepts -Wextra... " >&6; }
-if test ${ax_cv_check_cflags___Wextra+y}
+       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C 
compiler accepts -Wunused" >&5
+printf %s "checking whether the C compiler accepts -Wunused... " >&6; }
+if test ${ax_cv_check_cflags___Wunused+y}
 then :
   printf %s "(cached) " >&6
 else case e in #(
@@ -32243,7 +32287,7 @@ else case e in #(
   if test x"$GCC" = xyes ; then
     add_gnu_werror="-Werror"
   fi
-  CFLAGS="$CFLAGS  -Wextra $add_gnu_werror"
+  CFLAGS="$CFLAGS  -Wunused $add_gnu_werror"
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -32257,29 +32301,29 @@ main (void)
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
-  ax_cv_check_cflags___Wextra=yes
+  ax_cv_check_cflags___Wunused=yes
 else case e in #(
-  e) ax_cv_check_cflags___Wextra=no ;;
+  e) ax_cv_check_cflags___Wunused=no ;;
 esac
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
   CFLAGS=$ax_check_save_flags ;;
 esac
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: 
$ax_cv_check_cflags___Wextra" >&5
-printf "%s\n" "$ax_cv_check_cflags___Wextra" >&6; }
-if test "x$ax_cv_check_cflags___Wextra" = xyes
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: 
$ax_cv_check_cflags___Wunused" >&5
+printf "%s\n" "$ax_cv_check_cflags___Wunused" >&6; }
+if test "x$ax_cv_check_cflags___Wunused" = xyes
 then :
-  as_fn_append CWFLAGS " -Wextra"
+  as_fn_append CWFLAGS " -Wunused"
 else case e in #(
   e) : ;;
 esac
 fi
 
 
-       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C 
compiler accepts -Wno-sign-compare" >&5
-printf %s "checking whether the C compiler accepts -Wno-sign-compare... " >&6; 
}
-if test ${ax_cv_check_cflags___Wno_sign_compare+y}
+       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C 
compiler accepts -Wwrite-strings" >&5
+printf %s "checking whether the C compiler accepts -Wwrite-strings... " >&6; }
+if test ${ax_cv_check_cflags___Wwrite_strings+y}
 then :
   printf %s "(cached) " >&6
 else case e in #(
@@ -32288,7 +32332,7 @@ else case e in #(
   if test x"$GCC" = xyes ; then
     add_gnu_werror="-Werror"
   fi
-  CFLAGS="$CFLAGS  -Wno-sign-compare $add_gnu_werror"
+  CFLAGS="$CFLAGS  -Wwrite-strings $add_gnu_werror"
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -32302,20 +32346,20 @@ main (void)
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
-  ax_cv_check_cflags___Wno_sign_compare=yes
+  ax_cv_check_cflags___Wwrite_strings=yes
 else case e in #(
-  e) ax_cv_check_cflags___Wno_sign_compare=no ;;
+  e) ax_cv_check_cflags___Wwrite_strings=no ;;
 esac
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
   CFLAGS=$ax_check_save_flags ;;
 esac
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: 
$ax_cv_check_cflags___Wno_sign_compare" >&5
-printf "%s\n" "$ax_cv_check_cflags___Wno_sign_compare" >&6; }
-if test "x$ax_cv_check_cflags___Wno_sign_compare" = xyes
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: 
$ax_cv_check_cflags___Wwrite_strings" >&5
+printf "%s\n" "$ax_cv_check_cflags___Wwrite_strings" >&6; }
+if test "x$ax_cv_check_cflags___Wwrite_strings" = xyes
 then :
-  as_fn_append CWFLAGS " -Wno-sign-compare"
+  as_fn_append CWFLAGS " -Wwrite-strings"
 else case e in #(
   e) : ;;
 esac

diff --git a/configure.ac b/configure.ac
index 630d0958..53e3c157 100644
--- a/configure.ac
+++ b/configure.ac
@@ -203,24 +203,24 @@ AC_SUBST([GTREE_ENABLED], ["$do_gtree"])
 
 AX_CFLAGS_WARN_ALL([CWFLAGS])
 AC_DEFUN([PT_CHECK_CFLAG],[AX_CHECK_COMPILER_FLAGS([$1],[CFLAGS="$CFLAGS 
$1"])])
-# -Wno-sign-compare   gnulib stat-time.h :(
 m4_foreach_w([flag], [
-       -Wunused
-       -Wimplicit
-       -Wshadow
-       -Wformat=2
-       -Wmissing-declarations
-       -Wwrite-strings
        -Wbad-function-cast
-       -Wnested-externs
-       -Wcomment
-       -Winline
-       -Wchar-subscripts
        -Wcast-align
-       -Wsequence-point
-       -Wold-style-definition
+       -Wchar-subscripts
+       -Wcomment
+       -Wdiscarded-qualifiers
        -Wextra
+       -Wformat=2
+       -Wimplicit
+       -Winline
+       -Wmissing-declarations
+       -Wnested-externs
        -Wno-sign-compare
+       -Wold-style-definition
+       -Wsequence-point
+       -Wshadow
+       -Wunused
+       -Wwrite-strings
 ], [
        AX_CHECK_COMPILE_FLAG(flag, AS_VAR_APPEND([CWFLAGS], " flag"))
 ])

Reply via email to