Skip to content

Commit 76ce289

Browse files
committed
Only add -Wno-clobbered flag when the compiler recognizes it
1 parent 3f94f6a commit 76ce289

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Zend/Zend.m4

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,9 @@ else
222222
fi
223223
224224
test -n "$GCC" && CFLAGS="$CFLAGS -Wall -Wno-strict-aliasing -Wextra -Wno-implicit-fallthrough -Wno-unused-parameter -Wno-sign-compare"
225+
dnl Check if compiler supports -Wn-clobbered (only GCC)
226+
AX_CHECK_COMPILE_FLAG([-Wno-clobbered], CFLAGS="$CFLAGS -Wno-clobbered", , [-Werror])
227+
225228
test -n "$DEBUG_CFLAGS" && CFLAGS="$CFLAGS $DEBUG_CFLAGS"
226229
227230
if test "$ZEND_ZTS" = "yes"; then

0 commit comments

Comments
 (0)