Closed GrahamKnapATS closed 1 month ago
I wonder if we could reproduce this issue in CI ? This would help to observe, fix and then keep this problem under surveillance.
We already have VS2022
tests in Github CI :
https://github.com/Cyan4973/xxHash/actions/runs/9964304949/job/27532289053
but they do not flag any warning,
could it be a matter of varying some compilation parameters ?
It looks like CI is not making an MSVC build with DISPATCH
enabled. The MSVC build output does not mention xxh_x86dispatch.c
. Unfortunately, I don't know how to add that case to your CI. However, I can confirm that if I open the CMake project in VS2022, and add -DDISPATCH=1
to "CMake command arguments", then the warnings occur.
From what I can tell, the Visual test on Github Actions does feature a test with DISPATCH
enabled :
https://github.com/Cyan4973/xxHash/actions/runs/9964304949/job/27532289053#step:7:1
However, there are also multiple back ends available in Visual nowadays. So maybe you are using a different one than this test?
I could reproduce the issue in CI by employing a different back end
From what I can tell, the Visual test on Github Actions does feature a test with
DISPATCH
enabled : https://github.com/Cyan4973/xxHash/actions/runs/9964304949/job/27532289053#step:7:1However, there are also multiple back ends available in Visual nowadays. So maybe you are using a different one than this test?
Correct. I'm using MSVC, not clang.
Thanks for the report @GrahamKnapATS ,
there is now a test that checks compilation of xxhsum
with DISPATCH=1
using Visual compiler backend in CI.
It finds the same warning issues as you reported. They are now fixed in #963 .
With xxHash v0.8.2 and Visual Studio 2022 17.10, I receive C4113 warnings in
xxh_x86dispatch.c
.The problem appears to be similar to #716 and can be resolved by annotating the
input
andsecret
parameters withXXH_RESTRICT
, for the functions:XXH3_hashLong_64b_defaultSecret_selection
XXH3_hashLong_64b_withSeed_selection
XXH3_hashLong_64b_withSecret_selection