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 176790f commit 2762874
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 20 deletions.
34 changes: 17 additions & 17 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.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"
# - "2021.1.1"
# - "2021.1.2"
- "2021.2.0" # bad
# - "2021.3.0"
# - "2021.4.0"
# - "2022.0.1" # ok
# - "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 @@ -86,16 +86,16 @@ jobs:
. /opt/intel/oneapi/setvars.sh
icc --version
icc -dM -E - </dev/null
# - name: tmate session
# uses: mxschmitt/action-tmate@v3
- name: tmate session
uses: mxschmitt/action-tmate@v3
- name: Compile
env:
CC: icc
CXX: icpc
working-directory: test
run: |
. /opt/intel/oneapi/setvars.sh
make likely
make
# nvhpc:
# runs-on: ubuntu-latest
Expand Down
17 changes: 14 additions & 3 deletions hedley.h
Original file line number Diff line number Diff line change
Expand Up @@ -1727,13 +1727,24 @@ 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,21,5)) \
) || \
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,21,5) || 1) \
)
# define HEDLEY_FALL_THROUGH HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[clang::fallthrough]])
#elif HEDLEY_HAS_CPP_ATTRIBUTE(fallthrough)
#elif \
( \
HEDLEY_HAS_CPP_ATTRIBUTE(fallthrough) && \
(!defined(HEDLEY_INTEL_VERSION) || HEDLEY_INTEL_VERSION_CHECK(20,21,5) || 1) \
)
# define HEDLEY_FALL_THROUGH HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[fallthrough]])
#elif defined(__fallthrough) /* SAL */
# define HEDLEY_FALL_THROUGH __fallthrough
Expand Down

0 comments on commit 2762874

Please sign in to comment.