------- Additional Comments From qrczak at knm dot org dot pl  2005-02-24 21:06 
-------
> First, if we're talking about pthreads programs, which is the only case I'm
> suggesting removing the locking for, then those programs are already broken.

They are non-portable no matter how static initializers are done: C++ doesn't
include threads and POSIX doesn't include C++.

> If GCC/G++ are going to have non-portable features that make code work
> when they're enabled and break when they're disabled, they definitely
> should not be on by default.

Taking portability aside (as they are already non-portable), this is a wonderful
quote when taken out of context. Yeah, if an option makes more code working and
its negation makes more code break, let's make the breaking variant the default 
:-)

> (Or are you seriously arguing that the C++ standard and the
> POSIX standard *require* this behavior?)

Of course not. Not yet anyhow.

For me static locals in C++ are the equivalent of pthread_once in C/POSIX. A
hypothetical C++/POSIX should make them MT-safe.

-- 


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

Reply via email to