https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125460
Bug ID: 125460
Summary: std.cc module interface unit cannot be compiled with
-ffreestanding
Product: gcc
Version: 16.1.0
Status: UNCONFIRMED
Keywords: rejects-valid
Severity: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: redi at gcc dot gnu.org
Depends on: 125450
Target Milestone: ---
This fails with a large number of errors:
g++ -fmodule-only -fmodules -fsearch-include-path bits/std.cc -c -ffreestanding
It works without -ffreestanding.
Referenced Bugs:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125450
[Bug 125450] [16/17 Regression] std::optional breaks in C++26 freestanding mode