Skip to content
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

robin hood: resolve warning on new clang #44

Merged
merged 1 commit into from
Mar 3, 2025

Conversation

huww98
Copy link
Contributor

@huww98 huww98 commented Mar 2, 2025

Clang has this weird behavior of setting __GNUC__ to 4, hence clang will always take the if branch. This is suboptimal because std::is_trivially_copyable has almost always been in clang.

starting with clang 15 a warning is raised for the current implementation: warning: builtin __has_trivial_copy is deprecated; use __is_trivially_copyable instead [-Wdeprecated-builtins]

Since we are using -Werror, we should fix this.

Note this resolves the same issue with martinus/robin-hood-hashing#166 , but with a different patch.
But that PR is never released, and the original repo is archived. So, I just removed this helper. GCC4 is too old to support.

Clang has this weird behavior of setting __GNUC__ to 4, hence clang will always take the if branch. This is suboptimal because std::is_trivially_copyable has almost always been in clang.

starting with clang 15 a warning is raised for the current implementation:
warning: builtin __has_trivial_copy is deprecated; use __is_trivially_copyable instead [-Wdeprecated-builtins]

Since we are using -Werror, we should fix this.
Copy link
Collaborator

@SF-Zhou SF-Zhou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@SF-Zhou SF-Zhou merged commit c9f9511 into deepseek-ai:main Mar 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants