[Bug c++/52477] Wrong initialization order? __attribute__((constructor)) vs static data access
pluto at agmk dot net
gcc-bugzilla@gcc.gnu.org
Sun Mar 4 14:17:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52477
--- Comment #2 from Pawel Sikora <pluto at agmk dot net> 2012-03-04 14:16:29 UTC ---
you should specify explicit initialization order to avoid gpf, e.g.:
static std::map<int, int> m __attribute__((init_priority(101)));
static void insert() __attribute__((constructor(102)));
More information about the Gcc-bugs
mailing list