-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Sync -Wno-implicit-fallthrough #14187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
What are the warnings without this flag? Ideally for ext/date and lib, this should be warning free. |
For the ext/date, I wasn't able to reproduce the warning. Even on very old commits from PHP-8.2. It seems that this fallthrough warning in ext/date was happening on one of the CI machines back then but now it seems to be working ok with removing this flag. I think something was fixed in the meantime in the timelib. Tested on 32-bit and 64-bit... |
7f82cf6
to
760477f
Compare
This is a sync of the #6252 after few years: - ext/date: pending recheck in GH-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)
760477f
to
10c770c
Compare
ext/opcache and ext/hash have been synced in 743d1fd. |
10c770c
to
6fa8e17
Compare
So, why is this patch still needed if timelib has been fixed? |
If the timelib has been fixed, then the -Wno-implicit-fallthrough flag is not needed. That's more of an issue here. Having this flag will not notify if this issue is present or if a new code is added with such issue. If you prefer to leave this flag on entire ext/date code then let's have it. For example, I've removed it in my CMake build system and haven't found any warning emitted when building. Because unintended fallthroughs in case switches sound bad to me as they bring bugs, but that's just me. If these fallthroughs are something that isn't a problem, then ok. |
This is a sync of the #6252 after few years:
fixed since derickr/timelib@f8caaefEdited: wrong commit pasted, flag was removed in one of the commitsAnd I'm also checking CI how it looks.