Dumb question w.r.t. thread safety...
Martin v. Loewis
martin@loewis.home.cs.tu-berlin.de
Sat Apr 1 00:00:00 GMT 2000
> The way I take this to read is that it is, by default, using the older
> exception model, which I understood to be non-thread-safe.
Your understanding is incorrect. EH in egcs 1.0/gcc 2.8 was not thread
safe; it is thread-safe since egcs 1.1. The generator has nothing to
do with that, though; MT is done in libgcc.a. All the generator needs
to be concerned with is to call a function to get at the current
exception, instead of accessing a global variable.
> Might it also make sense, in the context of the "real release" of
> libstdc++-v3 (the one where it gets put in with the compiler) to
> also request that the GCC folks change the compiler defaults?
Changing the compiler defaults for everybody is not good, it should be
a configuration option. Then it depends on the exact selection of flags.
>
> For example: -fnew-abi -fnew-exceptions -fno-honor-std
> as the new default?
That is not a good example. I don't think you need -fnew-abi for
libstdc++ v3. In fact, -fnew-abi probably does things right now you
really don't want to happen. Also, I don't know why you need
-fnew-exceptions. As for -fno-honor-std - you would not need to change
that, as it is the current setting. However, I don't know why you need
-fno-honor-std - I believe -fhonor-std would be the right setting.
> Otherwise all the work of making basic_string<> thread safe doesn't
> make much sense, right?
Why is that?
Martin
More information about the Libstdc++
mailing list