https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119561

--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <[email protected]>:

https://gcc.gnu.org/g:26446cad5768b74f6c777ca135bc5bcfbd0f3f3d

commit r17-2438-g26446cad5768b74f6c777ca135bc5bcfbd0f3f3d
Author: Jakub Jelinek <[email protected]>
Date:   Thu Jul 16 09:51:48 2026 +0200

    libstdc++: Use _Clang::__no_specializations__ attribute in a few spots
[PR120635]

    The following patch adds _Clang::__no_specializations__ attribute
    to a couple of templates:
    1) LWG3975 - basic_format_{,parse_}context
    2) LWG3990 - variant, tuple
    3) LWG4305 - type_order
    4) LWG2129 - std::initializer_list
    This assumes all those issues were handled as defect reports.

    What I haven't touched, but has similar wording:
    5) P2652R2 - std::allocator_traits
    6) P3019R14 - std::indirect
    7) P0912R5 - std::coroutine_handle
    8) LWG4535 - <simd>

    Anything else I'm missing?

    Note, seems libcxx adds the attribute to significantly more places, but not
    sure if that is desirable. [namespace.std] has some restrictions, but those
    generally say that it is UB in that case, which I'm not sure is the right
    case for unconditional error.  Compared to that, the above mentioned
    library issues talk about ill-formed (and not IFNDR, so we really should
    be diagnosing that).

    2026-07-16  Jakub Jelinek  <[email protected]>

            PR c++/119561
            PR c++/120635
            * include/bits/c++config (_GLIBCXX_NO_SPECIALIZATIONS): Define.
            * include/std/variant (std::variant): Use it to resolve LWG3990.
            * include/std/format (std::basic_format_parse_context,
            std::basic_format_context): Use it to resolve LWG3975.
            * libsupc++/compare (std::type_order): Use it to resolve LWG4305.
            * libsupc++/initializer_list (std::initializer_list): Use it to
            resolve LWG2129.
            * include/std/tuple (std::tuple): Use it to resolve LWG3990.
            Temporarily ignore -Winvalid-specialization around specializations
            of tuple.
            * testsuite/18_support/comparisons/type_order/lwg4305.cc: New test.
            * testsuite/18_support/initializer_list/lwg2129.cc: New test.
            * testsuite/std/format/lwg3975.cc: New test.
            * testsuite/20_util/tuple/lwg3990.cc: New test.
            * testsuite/20_util/variant/lwg3990.cc: New test.

    Reviewed-by: Jonathan Wakely <[email protected]>

Reply via email to