Skip to content

Commit 760477f

Browse files
committed
Sync -Wno-implicit-fallthrough
This is a sync of the #6252 after few years: - ext/date: fixed since derickr/timelib@f8caaef - 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
1 parent fd2d869 commit 760477f

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

ext/date/config0.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ AC_CHECK_HEADERS([io.h])
44
dnl Check for strtoll, atoll
55
AC_CHECK_FUNCS(strtoll atoll)
66

7-
PHP_DATE_CFLAGS="-Wno-implicit-fallthrough -I@ext_builddir@/lib -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -DHAVE_TIMELIB_CONFIG_H=1"
7+
PHP_DATE_CFLAGS="-I@ext_builddir@/lib -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -DHAVE_TIMELIB_CONFIG_H=1"
88
timelib_sources="lib/astro.c lib/dow.c lib/parse_date.c lib/parse_tz.c lib/parse_posix.c
99
lib/timelib.c lib/tm2unixtime.c lib/unixtime2tm.c lib/parse_iso_intervals.c lib/interval.c"
1010

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)