Skip to content

fix: add missing -Wmaybe-uninitialized pragma to recursive variant_storage_impl#57

Merged
pdimov merged 1 commit intoboostorg:developfrom
alandefreitas:fix/issue-55-missing-pragma
Feb 24, 2026
Merged

fix: add missing -Wmaybe-uninitialized pragma to recursive variant_storage_impl#57
pdimov merged 1 commit intoboostorg:developfrom
alandefreitas:fix/issue-55-missing-pragma

Conversation

@alandefreitas
Copy link
Member

The recursive variant_storage_impl<mp11::mp_true, T1, T...> specialization is missing the same pragma that the flat specialization already has. This causes false-positive -Werror=maybe-uninitialized on GCC 7+ at -O3 when downstream libraries inline deeply through variant constructors.

Also lowers the existing cutoff from __GNUC__ >= 12 to >= 7 on both specializations — Boost.URL CI confirms GCC 7–11 trigger the same false positive.

Refs #55, boostorg/url#981

…_impl

The pragma added in the flat (10-member) specialization
for boostorg#55 is missing from the recursive (T1, T...)
specialization. GCC 14/15 at -O3 triggers the same
false positive here when deeply inlining constexpr
functions (e.g. system::result<url_view> construction).

Refs boostorg#55
@pdimov pdimov merged commit 4a1f14c into boostorg:develop Feb 24, 2026
57 of 58 checks passed
pdimov added a commit that referenced this pull request Feb 24, 2026
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