We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
attribute((fallthrough)) not supported by GCC 6.8, so this check works only for newer compilers:
#if defined(__clang__) || defined(__GNUC__) || defined(__APPLE_CC__) #define FALLTHROUGH __attribute__((fallthrough)) #else #define FALLTHROUGH #endif
Better to improve check as the following: #if defined(__GNUC__) && __GNUC__ >= 7
#if defined(__GNUC__) && __GNUC__ >= 7
The text was updated successfully, but these errors were encountered:
https://stackoverflow.com/questions/45349079/how-to-use-attribute-fallthrough-correctly-in-gcc
Sorry, something went wrong.
@vcoda I agree this should work for older gcc versions, my only concern is I don't have an immediate way to test it
If you are willing to make a PR with the macro #if change and confirm it works, would be happy to take it
#if
closed with #258
(thanks for making the PR)
No branches or pull requests
attribute((fallthrough)) not supported by GCC 6.8, so this check works only for newer compilers:
Better to improve check as the following:
#if defined(__GNUC__) && __GNUC__ >= 7
The text was updated successfully, but these errors were encountered: