__attribute__((constructor(101)))
Change-Id: Ic08c64eb9bae900c6be90c21074e64804e2fabc7
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
namespace detail_NODESTRUCT_GLOBAL { alignas(TYPE) extern uint8_t NAME[sizeof(TYPE)]; }\
/* awkwardly written to silence gcc's -Wstrict-aliasing because _Pragma("GCC diagnostic ignored \"-Wstrict-aliasing\"") is bugged */\
static inline TYPE &NAME() { auto p = static_cast<void*>(&detail_NODESTRUCT_GLOBAL::NAME[0]); return *reinterpret_cast<TYPE*>(p); }\
- namespace detailInit_NODESTRUCT_GLOBAL { __attribute__((constructor)) static void NAME() { new(&::NAME()) TYPE(); } }
+ namespace detailInit_NODESTRUCT_GLOBAL { __attribute__((constructor(101))) static void NAME() { new(&::NAME()) TYPE(); } }
/** Define a global variable that is constructed (via gcc's __attribute__((constructor))) but never destroyed. */
#define DEF_NODESTRUCT_GLOBAL(TYPE,NAME)\