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

--- Comment #8 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-13 branch has been updated by Richard Biener
<[email protected]>:

https://gcc.gnu.org/g:9239757a9c6e3a6e8d94d56803329d556ec914d7

commit r13-10253-g9239757a9c6e3a6e8d94d56803329d556ec914d7
Author: Andrew Pinski <[email protected]>
Date:   Mon Nov 25 14:03:27 2024 -0800

    build: Move sstream and memory include above safe-ctype.h [PR124830]

    This picks r15-5661-gf6e00226a4ca6 to older branches, also moving
    the <memory> include to fix build issues with a C++20 host compiler.

    sstream in some versions of libstdc++ include locale which might not have
been
    included yet. safe-ctype.h defines the toupper, tolower, etc. as macros so
the
    c++ header files needed to be included before hand as comment in system.h
says:
    /* Include C++ standard headers before "safe-ctype.h" to avoid GCC
       poisoning the ctype macros through safe-ctype.h */

    I don't understand how it was working before when memory was included after
    safe-ctype.h rather than before. But this makes sstream consistent with the
    other C++ headers.

    gcc/ChangeLog:

            PR target/117771
            PR c/124830
            * system.h: Move the include of sstream and memory above
safe-ctype.h.

    Signed-off-by: Andrew Pinski <[email protected]>
    (cherry picked from commit 046776dac7cc74bdbab36f450af80644a045858a)

Reply via email to