[Issue 17868] add pragma(crt_con/destructor[, priority])

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Oct 4 14:53:18 UTC 2017


https://issues.dlang.org/show_bug.cgi?id=17868

--- Comment #5 from Steven Schveighoffer <schveiguy at yahoo.com> ---
I've changed my mind a bit on this. It's OK to have a pragma that allows
stuffing function pointers into a section for compiler purposes, obviously we
already have custom pragmas anyway.

But I still am leary of adopting the "integer priority" as an official API for
it.

What may be better is:

pragma(ctr_constructor[, custom args])

Where custom args would vary based on what the compiler supports. This way, the
ctr_constructor part is standardized, but the custom args obviously depend on
support from the specific compiler. Use version statements as needed.

--


More information about the Digitalmars-d-bugs mailing list