Skip to content

Work around GCC co_await bugs in test macros#3092

Open
vasama wants to merge 1 commit intocatchorg:develfrom
vasama:test-macro-gcc-co-await
Open

Work around GCC co_await bugs in test macros#3092
vasama wants to merge 1 commit intocatchorg:develfrom
vasama:test-macro-gcc-co-await

Conversation

@vasama
Copy link
Copy Markdown

@vasama vasama commented May 2, 2026

Related GCC issues:

Related Catch2 issues:

Use a volatile boolean to guard the unevaluated test expression instead of CATCH_INTERNAL_IGNORE_BUT_WARN (based on __builtin_constant_p, now removed).

I did not remove CATCH_CONFIG_USE_BUILTIN_CONSTANT_P, though it now seems to be unnecessary. It's unclear to me if removing it would break user configurations.

@vasama vasama force-pushed the test-macro-gcc-co-await branch from f2db3e0 to 5c8f9ec Compare May 2, 2026 15:17
@codecov
Copy link
Copy Markdown

codecov Bot commented May 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.33%. Comparing base (11a96e1) to head (5c8f9ec).

Additional details and impacted files
@@            Coverage Diff             @@
##            devel    #3092      +/-   ##
==========================================
- Coverage   91.36%   91.33%   -0.03%     
==========================================
  Files         204      204              
  Lines        8903     8903              
==========================================
- Hits         8134     8131       -3     
- Misses        769      772       +3     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@vasama
Copy link
Copy Markdown
Author

vasama commented May 2, 2026

I had to add a variable initialiser in a test due to a now detected use of an uninitialised variable. Looks like the existing solution based on __builtin_constant_p was preventing some warnings from coming through.

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.

1 participant