public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/112553] New: noexcept lambda does not generate call to terminate
@ 2023-11-15 19:44 federico at kircheis dot it
  2023-11-15 20:03 ` [Bug c++/112553] " pinskia at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: federico at kircheis dot it @ 2023-11-15 19:44 UTC (permalink / raw)
  To: gcc-bugs

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-11-15 20:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-15 19:44 [Bug c++/112553] New: noexcept lambda does not generate call to terminate federico at kircheis dot it
2023-11-15 20:03 ` [Bug c++/112553] " pinskia at gcc dot gnu.org
2023-11-15 20:22 ` redi at gcc dot gnu.org
2023-11-15 20:27 ` federico at kircheis dot it

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).