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

Make ATTRIBUTE_FALLTHROUGH work cross-compiler #836

Merged
merged 2 commits into from
Aug 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,12 @@
/* Allow falling through in switch statements for the few cases where that
is needed */
#ifndef ATTRIBUTE_FALLTHROUGH
# if __GNUC_PREREQ (7, 0)
# define ATTRIBUTE_FALLTHROUGH __attribute__ ((fallthrough))
# if defined __has_attribute
# if __has_attribute (fallthrough)
# define ATTRIBUTE_FALLTHROUGH __attribute__ ((fallthrough))
# else
# define ATTRIBUTE_FALLTHROUGH
# endif
# else
# define ATTRIBUTE_FALLTHROUGH
# endif
Expand Down