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

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

https://gcc.gnu.org/g:a43cd560e4383774a7cfa5b0d4f29f7f5ec70fc1

commit r17-4044-ga43cd560e4383774a7cfa5b0d4f29f7f5ec70fc1
Author: Sammy Al Hashemi <[email protected]>
Date:   Wed Sep 9 09:06:31 2026 -0600

    libstdc++: Make make_decimalN inline instead of static [PR122071]

    The make_decimal32/64/128 overloads in <decimal/decimal.h> were declared
    static at namespace scope, which gives them internal linkage.  An entity
    with internal linkage cannot be exported, so these functions are not
    usable from modules when the header is consumed as a header unit or
    included in a module purview.  Internal linkage also means every
    translation unit including the header gets its own copy of each
    function, each with a distinct address.

    Declaring them inline instead gives them external linkage with
    vague-linkage semantics: a single entity shared across translation
    units, which can be exported.

    libstdc++-v3/ChangeLog:

            PR libstdc++/122071
            * include/decimal/decimal.h (make_decimal32): Make inline
            instead of static.
            (make_decimal64): Likewise.
            (make_decimal128): Likewise.

    Signed-off-by: Sammy Al Hashemi <[email protected]>

Reply via email to