https://llvm.org/bugs/show_bug.cgi?id=25997
David Majnemer <david.majne...@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |david.majne...@gmail.com, | |r...@google.com Resolution|--- |WONTFIX --- Comment #1 from David Majnemer <david.majne...@gmail.com> --- Thanks for the excellent bug report! This seems to be a quirk in the behavior of MSVC's personality routine. C++17 [except.handle]p9 says: If no matching handler is found, the function std::terminate() is called; whether or not the stack is unwound before this call to std::terminate() is implementation-defined. Clang has decided that your catch handler is not a matching handler because it is dynamically unreachable. Here is an example which doesn't rely on clang-cl. clang, gcc and icc give the following code different behavior depending on the optimization level: extern "C" void __attribute__((nothrow, noreturn)) exit(int); struct S { ~S() { exit(1); } }; void f() { S s; throw 0; } void g() { try { f(); } catch (...) { } } int main() { g(); } -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs