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

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

https://gcc.gnu.org/g:046776dac7cc74bdbab36f450af80644a045858a

commit r14-12513-g046776dac7cc74bdbab36f450af80644a045858a
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]>

Reply via email to