Add @attribute cctor/cdtor for C runtime constructors / destructors#183
Add @attribute cctor/cdtor for C runtime constructors / destructors#183jpf91 wants to merge 2 commits intoD-Programming-GDC:masterfrom
Conversation
|
@ibuclaw ping (one ping for all pull requests ;-) BTW:
|
|
@jpf91 - Apologies, I've been on a mini holiday, and just got back, I'll comb through what has been missed out shortly. :-) |
|
No need to apologize for holidays ;-) I just wanted to make sure there won't be too many changes on master before revisiting the pull requests to avoid some rebase / rewrite cycles :-) |
ibuclaw
left a comment
There was a problem hiding this comment.
I'll OK this before I go.
It looks like this is just a clean copy from c-common, if there's been any update in the meantime, then it may need syncing across.
|
Linking to dlang/dmd#6956 I guess I'll clean up this code this weekend, so we can finally close another way-too-old pull request. |
I'm not really a fan of |
Just wanted to say that I believe the same; -betterC is awfully blunt of an instrument. |
Certainly. We all know Walter doesn't want to add many compiler flags to DMD but I hope we can at least get different flag variables for such things in the frontend and then DMD can still choose to only allow setting all of these at once using -betterC
I don't particularly like the name either. We have |
|
@jpf91 - Going anywhere with this? Or shall we wait and see whether |
|
Let's wait whether |
We'll probably need this for shared library support and it's useful for low level programming as well.
Usage:
Would be nice if we could use
@cctorand@cctor(1001)instead. Using this:Almost works.
@cctor()and@cctor(1001)works, but@cctorcompiles but does not apply the attribute. Any idea how to fix this? This problem probably affects all other attributes as well.