]> Savannah Git Hosting - gnulib.git/commitdiff
manywarnings: use AS_IF
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 23 Apr 2023 15:54:00 +0000 (08:54 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 23 Apr 2023 15:54:38 +0000 (08:54 -0700)
* m4/manywarnings.m4 (gl_MANYWARN_COMPLEMENT):
Use AS_IF when the body contains Autoconf macros that could
conceivably require something.

ChangeLog
m4/manywarnings.m4

index ff1f6abca3a351947fee32eb12bff66fcd419351..8387b5ed5784581e5e81b093d8bfc496141397c7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 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.)
index 1d69116ddbf97607fa3b0bc4af5d0187ca453503..13db996516df8f71d936d72a75d942d430f485d3 100644 (file)
@@ -46,8 +46,7 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC(C)],
   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],
@@ -61,7 +60,7 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC(C)],
        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],
@@ -82,7 +81,7 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC(C)],
            [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
@@ -97,8 +96,7 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC(C)],
          [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: