Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding throw() after __cxa_atexit redefinition conflicts with cxxabi.h prototype #144

Open
Torrekie opened this issue Dec 29, 2023 · 0 comments

Comments

@Torrekie
Copy link

Torrekie commented Dec 29, 2023

ld.cpp:1702:16: error: exception specification in declaration does not match previous declaration
extern "C" int __cxa_atexit(void (*func) (void *), void * arg, void * dso_handle) CXA_ATEXIT_THROW;
               ^
/usr/bin/../include/c++/v1/cxxabi.h:140:32: note: previous declaration is here
extern _LIBCXXABI_FUNC_VIS int __cxa_atexit(void (*f)(void *), void *p,
                               ^
18 warnings and 1 error generated.

Latest llvm has been removed __cxa_atexit prototype from cxxabi.h so that this code works, but not for older llvm. Besides, Apple did not add throw() to the redefinition in the original code of ld.cpp

Possible patch is define CXA_ATEXIT_THROW as nothing when __APPLE__

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant