fix: add missing -Wmaybe-uninitialized pragma to recursive variant_storage_impl#57
Merged
pdimov merged 1 commit intoboostorg:developfrom Feb 24, 2026
Conversation
…_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
added a commit
that referenced
this pull request
Feb 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-uninitializedon GCC 7+ at-O3when downstream libraries inline deeply through variant constructors.Also lowers the existing cutoff from
__GNUC__ >= 12to>= 7on both specializations — Boost.URL CI confirms GCC 7–11 trigger the same false positive.Refs #55, boostorg/url#981