Re: [PATCH v2] libstdc++: Fix constexpr exceptions for -fno-exceptions

2025-07-14 Thread Jakub Jelinek
On Fri, Jul 11, 2025 at 03:12:44PM +0100, Jonathan Wakely wrote: > The if-consteval branches in std::make_exception_ptr and > std::exception_ptr_cast use a try-catch block, which gives an error for > -fno-exceptions. Just make them return a null pointer at compile-time > when -fno-exceptions is use

[PATCH v2] libstdc++: Fix constexpr exceptions for -fno-exceptions

2025-07-11 Thread Jonathan Wakely
The if-consteval branches in std::make_exception_ptr and std::exception_ptr_cast use a try-catch block, which gives an error for -fno-exceptions. Just make them return a null pointer at compile-time when -fno-exceptions is used, because there's no way to get an active exception with -fno-exceptions