[cfe-dev] behaviour on uncaught expression differs from g++
Douglas Gregor
dgregor at apple.com
Wed Sep 29 08:29:49 PDT 2010
On Sep 29, 2010, at 8:13 AM, Luc Bourhis wrote:
> 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?
This is a known Clang bug:
http://llvm.org/bugs/show_bug.cgi?id=8098
- Doug
More information about the cfe-dev
mailing list