Skip to content

Commit fc67f11

Browse files
committed
Add compiler flags which aren't included in -Wall or -Wextra
Adds the following compiler flags: . -Wduplicated-cond . -Wlogical-op . -Wformat-truncation . -fno-common
1 parent 9f55bf0 commit fc67f11

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Zend/Zend.m4

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,10 @@ fi
215215
test -n "$GCC" && CFLAGS="-Wall -Wextra -Wno-strict-aliasing -Wno-implicit-fallthrough -Wno-unused-parameter -Wno-sign-compare $CFLAGS"
216216
dnl Check if compiler supports -Wno-clobbered (only GCC)
217217
AX_CHECK_COMPILE_FLAG([-Wno-clobbered], CFLAGS="-Wno-clobbered $CFLAGS", , [-Werror])
218+
AX_CHECK_COMPILE_FLAG([-Wduplicated-cond], CFLAGS="-Wduplicated-cond $CFLAGS", , [-Werror])
219+
AX_CHECK_COMPILE_FLAG([-Wlogical-op], CFLAGS="-Wlogical-op $CFLAGS", , [-Werror])
220+
AX_CHECK_COMPILE_FLAG([-Wformat-truncation], CFLAGS="-Wformat-truncation $CFLAGS", , [-Werror])
221+
AX_CHECK_COMPILE_FLAG([-fno-common], CFLAGS="-fno-common $CFLAGS", , [-Werror])
218222
219223
test -n "$DEBUG_CFLAGS" && CFLAGS="$CFLAGS $DEBUG_CFLAGS"
220224

0 commit comments

Comments
 (0)