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

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

https://gcc.gnu.org/g:1b404c574450a48fee5f28f2acffafee7419fe38

commit r16-7919-g1b404c574450a48fee5f28f2acffafee7419fe38
Author: Nathan Myers <[email protected]>
Date:   Wed Mar 4 13:08:41 2026 -0500

    libstdc++: bitset subscript check when _GLIBCXX_ASSERTIONS [PR118341]

    Changes in v3:
     - Delete redundant "dg" annotations.

    Changes in v2:
     - Rejigger testing.
     - Add tests for regular bitset<>::op[].

    Perform __glibcxx_assert bounds check on indices to bitset<>::op[]
    for const and non-const overloads.

    Also, add previously neglected regular tests for bitset<>::op[].

    libstdc++-v3/ChangeLog
            PR libstdc++/118341
            * include/std/bitset (operator[] (2x)): Add assertion.
            * testsuite/20_util/bitset/access/118341_neg1.cc: New test.
            * testsuite/20_util/bitset/access/118341_neg2.cc: Same.
            * testsuite/20_util/bitset/access/118341_smoke.cc: Same.
            * testsuite/20_util/bitset/access/subscript.cc: Same.
            * testsuite/20_util/bitset/access/subscript_const_neg.cc: Same.

Reply via email to