https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117785
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #61540|0 |1 is obsolete| | --- Comment #20 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Created attachment 61546 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=61546&action=edit gcc16-pr117785-wip.patch Further progress. My current problem is with std::nested_exception (but guess arbitrary code which uses std::current_exception () or perhaps std::uncaught_exceptions ()). In the testcase I have (simplified): try { throw 42; } catch (...) { std::nested_exception c; if (c.nested_ptr () == nullptr) return -1; } and -1 is the return value I'm getting but don't expect. The problem is that when parsing the c declaration, we try to constant evaluate the constructor just in case it can be constructed without a call, and there current_exception () returns { nullptr } because it isn't evaluated with an active exception at that point. Shall the two functions just give up when not manifestly constant-evaluated? Or non-strict?