Skip to content

Commit

Permalink
fix: icc < 22.0.1 advertises but doesn't support the fallthrough attr…
Browse files Browse the repository at this point in the history
…ibute
  • Loading branch information
nemequ committed Sep 16, 2024
1 parent 7c44b9e commit 88f045f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 15 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,20 +56,20 @@ jobs:
fail-fast: false
matrix:
version:
- "2021.1.1"
- "2021.1.2"
- "2021.2.0"
- "2021.3.0"
# - "2021.1.1"
# - "2021.1.2"
# - "2021.2.0"
# - "2021.3.0"
- "2021.4.0"
- "2022.0.1"
- "2022.0.2"
- "2022.1.0"
- "2022.2.0"
- "2022.2.1"
- "2023.0.0"
- "2023.1.0"
- "2023.2.0"
- "2023.2.1"
# - "2022.0.2"
# - "2022.1.0"
# - "2022.2.0"
# - "2022.2.1"
# - "2023.0.0"
# - "2023.1.0"
# - "2023.2.0"
# - "2023.2.1"
steps:
- uses: actions/checkout@v4
- name: Free some disk space
Expand All @@ -95,7 +95,7 @@ jobs:
working-directory: test
run: |
. /opt/intel/oneapi/setvars.sh
make likely
make
# nvhpc:
# runs-on: ubuntu-latest
Expand Down
11 changes: 9 additions & 2 deletions hedley.h
Original file line number Diff line number Diff line change
Expand Up @@ -1727,11 +1727,18 @@ HEDLEY_DIAGNOSTIC_POP
# undef HEDLEY_FALL_THROUGH
#endif
#if \
HEDLEY_HAS_ATTRIBUTE(fallthrough) || \
( \
HEDLEY_HAS_ATTRIBUTE(fallthrough) && \
(!defined(HEDLEY_INTEL_VERSION) || HEDLEY_INTEL_VERSION_CHECK(20,22,0)) \
) || \
HEDLEY_GCC_VERSION_CHECK(7,0,0) || \
HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10)
# define HEDLEY_FALL_THROUGH __attribute__((__fallthrough__))
#elif HEDLEY_HAS_CPP_ATTRIBUTE_NS(clang,fallthrough)
#elif \
( \
HEDLEY_HAS_CPP_ATTRIBUTE_NS(clang,fallthrough) && \
(!defined(HEDLEY_INTEL_VERSION) || HEDLEY_INTEL_VERSION_CHECK(20,22,0)) \
)
# define HEDLEY_FALL_THROUGH HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[clang::fallthrough]])
#elif HEDLEY_HAS_CPP_ATTRIBUTE(fallthrough)
# define HEDLEY_FALL_THROUGH HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[fallthrough]])
Expand Down

0 comments on commit 88f045f

Please sign in to comment.