[Bug c++/37667] Initialization of global variables and functions with constructor attribute.

uleysky at gmail dot com gcc-bugzilla@gcc.gnu.org
Mon Sep 29 02:08:00 GMT 2008



------- Comment #2 from uleysky at gmail dot com  2008-09-29 02:07 -------
The priority must not be same. The only method to interact constructor function
with main is global variables. It is no reason to initialize global variables
after constructor function. Anyway,

Test ex_t __attribute__ ((init_priority(102)));
void Init() __attribute__ ((constructor(101)));

have no effect.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37667



More information about the Gcc-bugs mailing list