Go to the documentation of this file. 35 #define INITIALIZER(name) __attribute__((constructor(101))) static void name(void) 36 #define FINALIZER(name) __attribute__((destructor(101))) static void name(void) 37 #define REGISTER_FINALIZER(name) ((void) 0) 39 #elif defined(_MSC_VER) 44 #pragma section(".CRT$XCT", read) 45 #define INITIALIZER(name) \ 46 static void __cdecl name(void); \ 47 __declspec(allocate(".CRT$XCT")) void (__cdecl *const _##name)(void) = &name; \ 48 static void __cdecl name(void) 49 #define FINALIZER(name) \ 50 static void __cdecl name(void) 51 #define REGISTER_FINALIZER(name) \ 53 int _res = atexit(name); \ 58 #error Unsupported compiler