-
-
Notifications
You must be signed in to change notification settings - Fork 608
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
Make struct dtors work in -betterC via hack on Linux #6923
Conversation
|
It might make sense to suppress the generation of the call to _Unwind_Resume for now too... then you can make code that works with the libc as well. But we don't want to break it too much and code can always stub that out now. |
Sounds like a test case should be added to this PR! |
|
Thanks for your pull request, @adamdruppe! We are looking forward to reviewing it, and you should be hearing from a maintainer soon. Some tips to help speed things up:
Bear in mind that large or tricky changes may require multiple rounds of review and revision. Please see CONTRIBUTING.md for more information. Bugzilla references
|
7fe191f
to
1219367
Compare
|
@WalterBright Done |
7eea02c
to
ab03daa
Compare
…ork and exceptions are broken af anyway. Fixes Issue 17603
|
And the tests are all passing. It doesn't quite work on Windows. I figure we can change it to use C++ library EH there, but the betterC flag wasn't available in nteh.c and #including it led to other errors! So I labeled this as being just Linux as a small step forward, better than nothing. BTW on using C/C++ eh libs, I'm for that in general, though part of betterC's appeal to me is being able to pull out the C library too, so I say we want to keep that doable. not necessarily easy, but not harder than it needs to be either. Of course, that's a separate issue to this PR as it sits now which just hacks out the ref so we can use it today and worry about this later when we have a bit more real world experience. |
|
Sorry, I haven't had a chance to look at this yet. |
|
In general we shouldn't merge behavior that only works on some platforms. |
|
betterC is itself a hack that only works on some platforms. |
They currently fail because they output a reference to druntime personality function. This hacks it out. Follow-up to my other PR: #6922
These together with Walter's at #6918 achieve the goal I set out in October to make -betterC actually usable.
Still a filthy hack, especially this one, but a usable filthy hack. We can go back and add stuff back in like EH later.
Note: I have not tested betterC on Windows yet. I think the struct dtor already works there though.