Skip to content

Commit 743d1fd

Browse files
committed
Sync -Wno-implicit-fallthrough
This is a sync of the php#6252 after few years: - ext/date: pending recheck in phpGH-14187 - ext/hash: warning happens only on 32-bit build in ext/hash/sha3/generic32lc/KeccakP-1600-inplace32BI.c - ext/opcache: IR JIT doesn't seem to have this issue - ext/pcre remains disabled due to pcre2lib/sljit/sljitNativeARM_64.c (should be rechecked and fixed upstream)
1 parent fd2d869 commit 743d1fd

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

ext/hash/config.m4

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,15 @@ else
1919
AC_MSG_RESULT([no])
2020
SHA3_DIR="sha3/generic32lc"
2121
SHA3_OPT_SRC="$SHA3_DIR/KeccakP-1600-inplace32BI.c"
22+
dnl Add -Wno-implicit-fallthrough flag as it happens on 32 bit builds
23+
PHP_HASH_CFLAGS="-Wno-implicit-fallthrough"
2224
],[
2325
AC_MSG_RESULT([yes])
2426
SHA3_DIR="sha3/generic64lc"
2527
SHA3_OPT_SRC="$SHA3_DIR/KeccakP-1600-opt64.c"
2628
])
2729
EXT_HASH_SHA3_SOURCES="$SHA3_OPT_SRC $SHA3_DIR/KeccakHash.c $SHA3_DIR/KeccakSponge.c hash_sha3.c"
28-
dnl Add -Wno-implicit-fallthrough flag as it happens on 32 bit builds
29-
PHP_HASH_CFLAGS="-Wno-implicit-fallthrough -I@ext_srcdir@/$SHA3_DIR -DKeccakP200_excluded -DKeccakP400_excluded -DKeccakP800_excluded -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"
30+
PHP_HASH_CFLAGS="$PHP_HASH_CFLAGS -I@ext_srcdir@/$SHA3_DIR -DKeccakP200_excluded -DKeccakP400_excluded -DKeccakP800_excluded -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"
3031

3132
PHP_ADD_BUILD_DIR(ext/hash/$SHA3_DIR, 1)
3233
fi

ext/opcache/config.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ int main(void) {
337337
shared_alloc_mmap.c \
338338
shared_alloc_posix.c \
339339
$ZEND_JIT_SRC,
340-
shared,,"-Wno-implicit-fallthrough -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 ${JIT_CFLAGS}",,yes)
340+
shared,,"-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 ${JIT_CFLAGS}",,yes)
341341

342342
PHP_ADD_EXTENSION_DEP(opcache, pcre)
343343

0 commit comments

Comments
 (0)