Add -Wno-implicit-fallthrough conditionally. https://github.com/php/php-src/issues/13330 --- a/Zend/Zend.m4 2023-08-03 12:13:08.000000000 -0500 +++ b/Zend/Zend.m4 2024-04-16 06:15:32.000000000 -0500 @@ -172,7 +172,8 @@ AC_DEFINE(ZEND_DEBUG,0,[ ]) fi -test -n "$GCC" && CFLAGS="-Wall -Wextra -Wno-strict-aliasing -Wno-implicit-fallthrough -Wno-unused-parameter -Wno-sign-compare $CFLAGS" +test -n "$GCC" && CFLAGS="-Wall -Wextra -Wno-strict-aliasing -Wno-unused-parameter -Wno-sign-compare $CFLAGS" +AX_CHECK_COMPILE_FLAG([-Wno-implicit-fallthrough], [CFLAGS="-Wno-implicit-fallthrough $CFLAGS"],,[-Werror]) dnl Check if compiler supports -Wno-clobbered (only GCC) AX_CHECK_COMPILE_FLAG([-Wno-clobbered], CFLAGS="-Wno-clobbered $CFLAGS", , [-Werror])