[cfe-dev] behaviour on uncaught expression differs from g++

Luc Bourhis luc_j_bourhis at mac.com
Wed Sep 29 08:13:14 PDT 2010


Hi,

consider the following source file test.cpp

#include <stdexcept>

int main() {
  throw std::runtime_error("oops!");
  return 0;
}

~> g++ -o test test.cpp
~> ./test
terminate called after throwing an instance of 'std::runtime_error'
  what():  oops!
zsh: abort      ./test

~> clang++ -o test test.cpp
~> ./test
zsh: abort      ./test

How would I make clang++ generate code like g++ here, that would print the what() of the uncaught exception I mean?

Thanks,

Luc Bourhis


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3681 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20100929/c9369ab7/attachment.bin>


More information about the cfe-dev mailing list