[Bug libstdc++/105681] [12 Regression] libstdc++-v3 fails to build on msp430

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Jun 8 15:52:59 GMT 2022


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

--- Comment #14 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Jonathan Wakely
<redi@gcc.gnu.org>:

https://gcc.gnu.org/g:6666ca1ab44ad8a61e2b916cf4173fe452b78ed6

commit r12-8464-g6666ca1ab44ad8a61e2b916cf4173fe452b78ed6
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Thu May 26 21:32:55 2022 +0100

    libstdc++: Fix narrowing conversions for 16-bit size_t [PR105681]

    On a 16-bit target such as msp430 we get errors about narrowing long
    values to size_t, which is only 16-bit. When --enable-libstdcxx-pch is
    used the <bits/extc++.h> header breaks the build because of these
    narrowing errors.

    libstdc++-v3/ChangeLog:

            PR libstdc++/105681
            *
include/ext/pb_ds/detail/resize_policy/hash_prime_size_policy_imp.hpp:
            Limit ga_sizes array to values that fit in size_t.
            * include/ext/random [__SIZE_WIDTH < 32] (sfmt86243)
            (sfmt86243_64, sfmt132049, sfmt132049_64, sfmt216091)
            (sfmt216091_64): Do not declare.

    (cherry picked from commit 367740bf6d3a6627798b3955e5d85efc7549ef50)


More information about the Gcc-bugs mailing list