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

Replace compiler-specific fallthrough with more general form #8

Conversation

bluebandit21
Copy link
Contributor

The C++ attribute [[fallthrough]] was standardized in C++ 17 (see: here )
Currently, all major compilers support it :)

On GCC, trying to compile hash.hpp creates a compiler error by default, as it doesn't know about the clang-specific clang::fallthrough attribute.

Replacing it with the more general standardized form fixes compilation on GCC without affecting Clang builds at all.

[[fallthrough]] as an attribute was standardized quite a while ago,
and gcc (rightfully) doesn't like [[clang::fallthrough]] :)
@luigicapogrosso
Copy link
Owner

Hi @bluebandit21, thanks for fixing it!

@luigicapogrosso luigicapogrosso merged commit 0336f03 into luigicapogrosso:main Mar 26, 2024
6 checks passed
@bluebandit21 bluebandit21 deleted the fix/fallthrough_attribute_for_gcc branch March 26, 2024 19:49
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