Coroutines are not supported by C-generating back end #179
Copy link
Copy link
Open
Labels
Description
Reproducer:
//options_all:--c++20
#include <coroutine>
struct task {
struct promise_type {
task get_return_object() { return {}; }
std::suspend_never initial_suspend() { return {}; }
std::suspend_never final_suspend() noexcept { return {}; }
void return_void() {}
void unhandled_exception() {}
};
};
task f() { co_return; }Error:
error: unknown type name 'co_await'
error: expected declaration specifiers or '...' before '(' token
error: '__TXXXXXXXXX' undeclared (first use in this function)
The emitted body includes calls such as
co_await_ZN4task12promise_type15initial_suspendEv(&promise).
Currently this breaks building of Boost.Cobalt
Activity
mborland commentedon Oct 7, 2026
Per Wyatt on Slack EDG parses coroutines but there is no C lowering process