-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed
Labels
bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behavioros-macoszig ccZig as a drop-in C compiler featureZig as a drop-in C compiler feature
Milestone
Description
Zig Version
0.10.0-dev.4192+c75e8f361
Steps to Reproduce
Initially tested on 0.10.0-dev.2377+71e2a56e3, same thing happens on 0.10.0-dev.4192+c75e8f361
Same issue as #9591 but for macOS arm64 (on an M1 mbp).
yikes.cpp:
#include <iostream>
#include <exception>
int main() {
try {
throw std::exception();
} catch (std::exception &) {
std::cerr << "yikes";
}
return 0;
}
Expected Behavior
With clang:
$ clang++ yikes.cpp && ./a.out
yikes
Actual Behavior
With zig c++:
$ zig c++ yikes.cpp && ./a.out
libc++abi: terminating due to uncaught exception of type std::exception: std::exception
Abort trap: 6
Metadata
Metadata
Assignees
Labels
bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behavioros-macoszig ccZig as a drop-in C compiler featureZig as a drop-in C compiler feature