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

--- Comment #8 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-13 branch has been updated by Jonathan Wakely
<r...@gcc.gnu.org>:

https://gcc.gnu.org/g:30a0a942007ac01601c6493b558b747d6a5b6371

commit r13-9485-g30a0a942007ac01601c6493b558b747d6a5b6371
Author: Jonathan Wakely <jwak...@redhat.com>
Date:   Tue Apr 1 11:02:43 2025 +0100

    libstdc++: Avoid bogus -Walloc-size-larger-than warning in test [PR116212]

    The compiler can't tell that the vector size fits in int, so it thinks
    it might overflow to a negative value, which would then be a huge
    positive size_t.  In reality, the vector size never exceeds five.

    There's no warning on trunk, so just change the local variable to use
    type unsigned so that we get rid of the warning on the branches.

    libstdc++-v3/ChangeLog:

            PR libstdc++/116212
            *
testsuite/20_util/specialized_algorithms/uninitialized_move/constrained.cc:
            Use unsigned for vector size.

Reply via email to