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

--- Comment #1 from Kael Franco <kaelfandrew at gmail dot com> ---
(In reply to Debashish Ghosh from comment #0)
> Compilation fails when using std::optional in C++26 freestanding mode (since
> GCC 16 onwards)
> 
> Code:
> --------------------------------------------------------------
> 
> // -std=c++26 -fno-exceptions -fno-rtti -ffreestanding -nostdlib
> #include <optional>
> 
> static_assert(!std::optional<int>{}.has_value());
> 
> --------------------------------------------------------------
> 
> Reference: https://godbolt.org/z/WGE9eefYT

First bad commit that errors by adding std::optional support:
r16-1487-g774ae8734f0e19

Reply via email to