2 msgCompilation error while return function pointers
2 msgprogram with various files be compiled
2 msghelp!!
3 msgHelp installing GCC on to from-scratch system
1 msgOut of Office AutoReply: ezmlm warning
3 msgYet another aliasing question.
3 msginfo files under windows
3 msgGUI programming
1 msgARM startup file
3 msghelp....
3 msgOutput of (estimated) remaining compile time fo...
2 msgFw: About the precision of cos() sin() and tan(...
2 msgInitialization of zero globals
1 msgloop vectorization vs. sequential code vectoriz...

__thread storage specifier documentation
\ Roger Ferrer Ibáñez (21 Dec 2006)

6 msgmingw help!!!
2 msggcc core gcc++
2 msgSyntax error when building gfortran in gcc-4.0.3
2 msg'Woodcrest' Xeon 3.0ghz optimal -march and opti...
2 msgLinking problems with gcc and AIX
Subject:__thread storage specifier documentation
Group:Gcc-help
From:Roger Ferrer Ibáñez
Date:21 Dec 2006


Hi,

this is just a minor clarification about the documentation on __thread
gcc keyword.

According to

http://gcc.gnu.org/onlinedocs/gcc/Thread_002dLocal.html#Thread_002dLocal

"The __thread specifier may be used alone, with the extern or static
specifiers, but with no other storage class specifier. When used with
extern or static, __thread must appear _immediately_ after the other
storage class specifier."

I wonder if this _immediately_ means that the __thread keyword must
appear next to the "extern" or "static" (if any) or the programmer can
intersperse other declaration specifiers between them, but keeping the
order between storage specifiers.

I mean,

void f()
{
/* This is strictly immediately "static __thread", gcc accepts this */
static __thread int a;

/* This is not strictly immediately, there is type-specifier 'int'
between 'static' and '__thread' and gcc accepts this */
static int __thread b;
}

Thank you !

--
Roger Ferrer Ibáñez - roger.ferrer


© 2004-2008 readlist.com