Compile error:unreachable code #1038
Labels
No labels
announcement
bug
build
CI
dependencies
documentation
duplicate
enhancement
experience feedback
feature request
github_actions
help wanted
install
invalid
Long-term
optimization
portability
question
target-specific
test issue
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-Cyan4973/xxHash#1038
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I got wired complile error with VS2022, any solutions?
3169 line is
h32 = XXH32_mergeAccs(acc);in functionXXH32_endian_alignAnyone has same error?
Hi @mi2think,
We need further details of your issue/project. Could you provide how to reproduce your issue?
It seems you're using vcpkg. At least in my environment, I don't hit any issue with genuine VS2022 + MSVC + xxhash from vcpkg.
Please check the following project and command:
msbuilddoesn't report any error. And the output is:xxhash-issue-1038-msvc-project.zip
Thanks for your replay. After done as you saied, it output 0 errors & 0 warnings, and
XXH_versionNumber=803. So it's a wired error.I'm compiling zen server project . In linking stage, detail error as below:
VS2022 version is :
17.14.1and after switch to17.8.21same error.The issue has been reproduced and fixed in ##1139.
I can't understand why MSVC complains about that,
the code becomes unreachable as a result of its own optimization due to constant propagation at LTO time,
which is actually a good thing (the optimizer is right), hence no reason to complain about it.
Fixed by disabling
C4702locally.