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

            Bug ID: 112553
           Summary: noexcept lambda does not generate call to terminate
           Product: gcc
           Version: 13.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: federico at kircheis dot it
  Target Milestone: ---

Consider following example

----
void do_something();

void bar(){
    []() noexcept{
    do_something();
    }();
}

----


If "do_something" throws, as the lambda is marked noexcept, there should be a
call to std::terminate, but it is not the case: https://godbolt.org/z/xjqzTdrWG

clang and msvc generate the call to std::terminate

Reply via email to