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: thread-local storage: c++ front end


On Tue, May 21, 2002 at 11:00:06PM -0400, Jason Merrill wrote:
> So something like
> 
>   struct A {
>     static __thread int i;
>   };
> 
>   __thread int A::i = 42;
> 
>   template <typename T> struct B {
>     static __thread T t;
>   };
> 
>   template <typename T> 
>   __thread T B<T>::t = 42;
> 
>   int main ()
>   {
>     int j = B<int>::t;
>   }
> 
> ?

Yes, thanks.  I'll see what I can make of that.

> This should probably go in obscure_complex_init.

Hmm, ok.  I'd had that there at first, but then thought that
more things than constructors went through it.

> Any reason the tls tests need their own directory?  There are few enough
> that I'd tend to put them under special.

*shrug* There are only a few now, but it does seem like
categorization is a good thing.


r~


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