This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: Fix weak handling with GCC 3.4+
> Date: Fri, 3 Jan 2003 15:03:59 -0800
> From: Richard Henderson <rth@twiddle.net>
> On Fri, Jan 03, 2003 at 02:53:53PM -0800, Geoff Keating wrote:
> > Another underspecified GCC extension!
>
> No it isn't.
Perhaps 'incorrectly specified'?
The specification in extend.texi says
> An object whose identifier is declared with the storage-class
> specifier @w{@code{__thread}} has @dfn{thread storage duration}.
So, consider this program fragment:
> > __thread int foo = 0; // line 1
> > extern __typeof (foo) foo; // line 2
line 1 is a declaration (and also a definition, but never mind that)
of 'foo', and it includes the storage-class specifier __thread. Thus,
'foo' has thread storage duration. The result would be the same if
this was written
extern int foo;
__thread int foo = 0;
or
extern __thread int foo;
int foo = 0;
...
> Please re-read the documentation I wrote for __thread.
> It contains rationale for why all declarations of foo
> must specify __thread.
Is the extend.texi documentation what you were thinking of? I can't
see anywhere it says that all declarations must specify __thread.
--
- Geoffrey Keating <geoffk@geoffk.org>