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

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

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

commit r17-6023-ga70f7ee802d9adaf3727d392e7be2f5eacba78ca
Author: Jason Merrill <[email protected]>
Date:   Sat Nov 7 15:44:28 2026 -0500

    libcpp: don't assume an alternate header exists [PR127940]

    Here when trying to translate a standard library #include into import
    <bits/stdc++.h> we gave a hard error if stdc++.h did not exist, which
breaks
    using an alternate standard library.  Let's make the check fail silently by
    using the __has_include mode.

    It's awkward to add a test for this because dejagnu always adds the
    libstdc++ headers so an -I in the testcase options is never searched; I had
    to override ALWAYS_CXXFLAGS for this one testcase in module.exp.

            PR c++/127940

    libcpp/ChangeLog:

            * files.cc (_cpp_stack_include): Use _cpp_FFK_HAS_INCLUDE
            to check for an alternate header.

    gcc/testsuite/ChangeLog:

            * g++.dg/modules/inc-xlate-5.C: New test.
            * g++.dg/modules/dummy-stdlib/stdexcept: For new test.
            * g++.dg/modules/modules.exp: Override ALWAYS_CXXFLAGS for it.
  • [Bug c++/127940] [modules] Opti... cvs-commit at gcc dot gnu.org via Gcc-bugs

Reply via email to