[Bug c++/20099] -pthreads should imply -fno-threadsafe-statics
davids at webmaster dot com
gcc-bugzilla@gcc.gnu.org
Mon Feb 21 16:34:00 GMT 2005
------- Additional Comments From davids at webmaster dot com 2005-02-20 23:59 -------
What you keep ignoring is that the POSIX standard explicitly declares it a bug
to access data in one thread while it may be modified in another. It's not
"unfortunate timing", it's failure to use the proper code to ensure correct timing.
You say a hypothetical multithreaded C++ should state this as the semantics for
static locals, and I don't disagree with you, provided we are not talking about
one based on POSIX threads. POSIX specifically made the design decision to
always require explicit locks and to always require the programmer to find,
document, and lock cases where concurrent accesses might occur.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20099
More information about the Gcc-bugs
mailing list