dispatch: fix compilation with XXH_INLINE_ALL #1134
No reviewers
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!1134
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/inline-all-dispatch"
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?
XXH_INLINE_ALLredefinesXXH_PUBLIC_APIasstatic, but the dispatch entry points are necessarily provided by a separate unit (xxh_x86dispatch.c).MSVC rejects it (
C2129, issue #1071), gcc & clang warn.Declare them with a dedicated
XXH_DISPATCH_APImarker instead, which keeps external linkage, whatever the including unit requests.Added
tests/inlineDispatch.c, which combinesXXH_INLINE_ALLwith the dispatcher, and checks that single-shot and streaming variants still generate correct hashes.Test compiled with
-Werrorto convert the warning into a hard error.fix #1071