Skip to content

mars2grib: remove __builtin_unreachable()#173

Draft
tweska wants to merge 5 commits intodevelopfrom
feature/mars2grib-remove-unreachable
Draft

mars2grib: remove __builtin_unreachable()#173
tweska wants to merge 5 commits intodevelopfrom
feature/mars2grib-remove-unreachable

Conversation

@tweska
Copy link
Member

@tweska tweska commented Mar 2, 2026

Remove all occurrences of mars2gribUnreachable();, which is an alias for __builtin_unreachable(). I found only two cases where removing the __builtin_unreachable() actually produces a warning and these cases can be rewritten to avoid it.

@tweska tweska force-pushed the feature/mars2grib-remove-unreachable branch from fd98952 to a0d999b Compare March 2, 2026 15:41
@tweska tweska changed the title mars2grib remove __builtin_unreachable() mars2grib: remove __builtin_unreachable() Mar 2, 2026
@codecov-commenter
Copy link

codecov-commenter commented Mar 2, 2026

Codecov Report

❌ Patch coverage is 14.28571% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 60.88%. Comparing base (5056555) to head (21cefcf).

Files with missing lines Patch % Lines
.../mars2grib/backend/deductions/numberOfTimeRanges.h 0.00% 5 Missing ⚠️
...ars2grib/backend/deductions/statisticsDescriptor.h 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #173      +/-   ##
===========================================
- Coverage    60.89%   60.88%   -0.01%     
===========================================
  Files          309      309              
  Lines        11732    11753      +21     
  Branches      1035     1035              
===========================================
+ Hits          7144     7156      +12     
- Misses        4588     4597       +9     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tweska tweska force-pushed the feature/mars2grib-remove-unreachable branch from dde71ad to b78883e Compare March 2, 2026 17:53
Comment on lines +139 to +141
#if defined(__INTEL_COMPILER)
__builtin_unreachable();
#endif
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the only case where I have not been able to remove the __builtin_unreachable() for the Intel compiler. It is not possible to collapse the else branch into the parent scope here.

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