Swift cannot import libstdc++-13 chrono header in C++23 mode #76809
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
triage needed
This issue needs more specific labels
Description
Importing STL headers from
gcc (Ubuntu 13.2.0-23ubuntu4) 13.2.0
as shipped by Ubuntu 24.04 fails to compile due to errors compiling libstdc++ with -std=c++23This seems to only happen when doing an emit-cxx-headers call from the frontend, and not during emit-executable?
Reproduction
The same test case files as #75593, just using ubuntu 24.04,
And a tweak to include
<chrono>
I've created a project here that can reproduce the issue ADKaster/swift-shlib-cxx-exe with
The necessary change to reproduce this issue, rather than 75593, is to add an include to Color.h
Color.h
A minimized frontend command is like so:
swiftc -frontend -typecheck -Ishlib shlib/Color.swift -Xcc -std=c++23 -module-name ShlibSwift -cxx-interoperability-mode=default -emit-clang-header-path Color-Swift.h
Expected behavior
A compiling example with -std=c++23, as it works with std=c++20 and below.
Environment
Swift version 6.1-dev (LLVM 89ccf4b8a46135a, Swift 6a5ae8d)
Target: x86_64-unknown-linux-gnu
Additional information
error output from cmake build with chrono added
The text was updated successfully, but these errors were encountered: