This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC: PATCH for thread-safe C++ static local initialization


>> Maybe we should *always* do the full code sequence.
>
>I think we should do it unless explicitly disabled, a la
>-fno-rtti/-fno-exceptions.

Presumably, those embedded systems (or other configurations) that don't
want this default sequence will configure with --disable-threads, which
will default to gthr-single.h, which doesn't define __GTHREADS, which
means none of this stuff will get pulled in for them anyway.

So, there is a way to disable this, as-is.

Jason, you're right that this code is more complex. It is also correct.
IMHO, we should just be using it by default, not figuring out a way to
subvert __cxa_guard_* functions.

-benjamin


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]