https://sourceware.org/bugzilla/show_bug.cgi?id=23424
--- Comment #3 from Harald Fernengel <harryf at gmx dot com> --- (In reply to Cary Coutant from comment #2) > > It seems that using PTHREAD_ONCE_INIT can only be used in a static context, > > as > > documented in the man page (https://linux.die.net/man/3/pthread_once). Since > > it's POD, doing a deep copy with a statically initialized dummy should be a > > pragmatic workaround (see attached patch). > > Can you point out where in that man page you found this? I've read > several man pages for pthread_once, and can't find any such > restriction on the use of PTHREAD_ONCE_INIT. Sorry for that, I've wrongly translated "not in automatic storage" to "only static storage" in my mind. Of course, dynamic storage must also work. In any case - Any preference on the fix? So far, we have my workaround to statically initialize a dummy instance and then deep copying it per object instance, or switching compilation to C++11. -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils