Issue 182974
Summary GCC (libstdc++) and LLVM (libc++) disagree about location of std::uncaught_exception
Labels libc++
Assignees
Reporter brooksmoses
    GCC's `libstdc++` defines `std::uncaught_exception` in `libsupc++`: [`eh_catch.cc` line 137](https://github.com/gcc-mirror/gcc/blob/master/libstdc%2B%2B-v3/libsupc%2B%2B/eh_catch.cc#L137).

LLVM's defines it in `libc++`, not in `libc++abi`: [`src/support/runtime/exception_libcxxabi.ipp`](https://github.com/llvm/llvm-project/blob/main/libcxx/src/support/runtime/exception_libcxxabi.ipp).

This means that when we link an application with GCC's `libstdc++` and `libc++abi` rather than `libsupc++`, and attempt to use `std::uncaught_exception` (as in [this `libstdc++` test](https://github.com/gcc-mirror/gcc/blob/master/libstdc%2B%2B-v3/testsuite/18_support/uncaught_exception/14026.cc)), we get a missing symbol error.

I'm not sure how much this sort of linking configuration is "supported", but we ran into this today in some testing, and almost everything else in the version of the libstdc++ testsuite that we're using works, so it seemed worth noting.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to