-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
The use of __attribute__((__constructor__)) #58
Comments
Thanks for reporting @Orvid. In this example - I believe that it's to make sure that this structure is available when |
It's just a general question, regarding all uses of the attribute. |
I think we're trying to move away from static initializers with non-trivial destructors because destruction order is difficult to reason about. |
@Orvid, can we close this issue? |
Yep. |
Is there a specific reason that
__attribute__((__constructor__))
is used rather than a dynamic initializer like:I ask because, although I can provide the same thing with MSVC, it's not exactly pretty, and it would be much cleaner to switch to initializers.
The text was updated successfully, but these errors were encountered: