Skip to content

Comments

fix: replace blanket -Wno-maybe-uninitialized with targeted pragmas (#979)#981

Open
alandefreitas wants to merge 3 commits intoboostorg:developfrom
alandefreitas:fix-979
Open

fix: replace blanket -Wno-maybe-uninitialized with targeted pragmas (#979)#981
alandefreitas wants to merge 3 commits intoboostorg:developfrom
alandefreitas:fix-979

Conversation

@alandefreitas
Copy link
Member

@alandefreitas alandefreitas commented Feb 24, 2026

Remove the blanket -Wno-maybe-uninitialized suppression from all GCC builds and add a scoped pragma around the one site in our code that triggers the false positive (parse_sequence in tuple_rule.hpp). Also removes the unused BOOST_URL_NO_INLINE macro.

The remaining false positives originate inside variant2 and optional headers and need to be fixed upstream:

The third commit is a temporary CI patch that copies fixed versions of those headers to prove the full fix works across GCC 7–15. It will be dropped once the upstream PRs are merged.

GCC 7+ at -O3 emits false -Wmaybe-uninitialized from
variant2 union storage when deeply inlining constexpr
functions. Wrap the affected parse_sequence code in
tuple_rule.hpp with a diagnostic pragma.

fix boostorg#979
@cppalliance-bot
Copy link

cppalliance-bot commented Feb 24, 2026

An automated preview of the documentation is available at https://981.url.prtest2.cppalliance.org/index.html

If more commits are pushed to the pull request, the docs will rebuild at the same URL.

2026-02-24 21:55:26 UTC

@cppalliance-bot
Copy link

GCOVR code coverage report https://981.url.prtest2.cppalliance.org/gcovr/index.html
LCOV code coverage report https://981.url.prtest2.cppalliance.org/genhtml/index.html
Coverage Diff Report https://981.url.prtest2.cppalliance.org/diff-report/index.html

Build time: 2026-02-24 17:19:12 UTC

@cppalliance-bot
Copy link

cppalliance-bot commented Feb 24, 2026

GCOVR code coverage report https://981.url.prtest2.cppalliance.org/gcovr/index.html
LCOV code coverage report https://981.url.prtest2.cppalliance.org/genhtml/index.html
Coverage Diff Report https://981.url.prtest2.cppalliance.org/diff-report/index.html

Build time: 2026-02-24 22:02:59 UTC

@codecov
Copy link

codecov bot commented Feb 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.15%. Comparing base (fdb3ca4) to head (d0f686e).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##           develop     #981   +/-   ##
========================================
  Coverage    99.15%   99.15%           
========================================
  Files          155      155           
  Lines        10045    10045           
========================================
  Hits          9960     9960           
  Misses          85       85           
Files with missing lines Coverage Δ
include/boost/url/grammar/impl/tuple_rule.hpp 100.00% <100.00%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fdb3ca4...d0f686e. Read the comment docs.

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

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.

GCC 14/15 -Wmaybe-uninitialized false positive in tuple_rule.hpp

2 participants