On 02 July 2006 08:15, Seongbae Park wrote:

> On 7/1/06, Gary Funck <[EMAIL PROTECTED]> wrote:
> ...
>> What are the technical reasons for the front-end enforcing this
>> restriction, when apparently some linkers will handle the TLS linkage
>> fine?  If in fact it is required that __thread be added to the extern, is
>> the compiler simply accommodating a limitation/bug in the linker?
> 
> Because the compiler has to generate different code
> for accesses to __thread vs non __thread variable:

  Reasons like this are why we have 6.2.7.2 in the C language spec, aren't
they?

"All declarations that refer to the same object or function shall have
compatible type; otherwise, the behavior is undefined. "

  Perhaps we should regard __thread as being like a type-qualifier of some
kind?  

    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....

Reply via email to