2023-04-23 Paul Eggert <eggert@cs.ucla.edu>
+ manywarnings: use AS_IF
+ * m4/manywarnings.m4 (gl_MANYWARN_COMPLEMENT):
+ Use AS_IF when the body contains Autoconf macros that could
+ conceivably require something.
+
manywarnings: update C warnings for GCC 13
Adjust for C programs compiled by GCC 13.
(A C++ expert still needs to look at manywarnings-c++.m4.)
dnl First, check for some issues that only occur when combining multiple
dnl gcc warning categories.
AC_REQUIRE([AC_PROG_CC])
- if test -n "$GCC"; then
-
+ AS_IF([test -n "$GCC"], [
dnl Check if -Wextra -Werror -Wno-missing-field-initializers is supported
dnl with the current $CC $CFLAGS $CPPFLAGS.
AC_CACHE_CHECK([whether -Wno-missing-field-initializers is supported],
CFLAGS="$gl_save_CFLAGS"
])
- if test "$gl_cv_cc_nomfi_supported" = yes; then
+ AS_IF([test "$gl_cv_cc_nomfi_supported" = yes], [
dnl Now check whether -Wno-missing-field-initializers is needed
dnl for the { 0, } construct.
AC_CACHE_CHECK([whether -Wno-missing-field-initializers is needed],
[gl_cv_cc_nomfi_needed=yes])
CFLAGS="$gl_save_CFLAGS"
])
- fi
+ ])
dnl Next, check if -Werror -Wuninitialized is useful with the
dnl user's choice of $CFLAGS; some versions of gcc warn that it
[gl_cv_cc_uninitialized_supported=no])
CFLAGS="$gl_save_CFLAGS"
])
-
- fi
+ ])
# List all gcc warning categories.
# To compare this list to your installed GCC's, run this Bash command: