APAR status
Closed as program error.
Error description
The following error is received when compiling this testcase: "1540-2638 (S) The __thread keyword can only be specified for external or static data." ______________________________________________________________ ______________________________________________________________ ______________________________________________________________ #include <omp.h> class A { public: static __thread int localInt; }; __thread int A::localInt; int main () { A::localInt = 10; printf( "Static's value: %d\n", A::localInt ); return 0; }
Local fix
Use namespace scoped thread static variables instead of member thread static variables. ______________________________________________________________ ______________________________________________________________ For example: namespace A { static __thread int localInt; }; Instead of: class A { public: static __thread int localInt; }; __thread int A::localInt;
Problem summary
thread static local and thread static data member variables. Invalid error diagnostic emitted by compiler.
Problem conclusion
The invalid diagnostics have been corrected and correct functionality confirmed.
Temporary fix
Comments
APAR Information
APAR number
IZ34321
Reported component name
XL C AIX
Reported component ID
5724S7000
Reported release
900
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt
Submitted date
2008-10-10
Closed date
2008-10-23
Last modified date
2009-02-11
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
Fix information
Fixed component name
XL C AIX
Fixed component ID
5724S7000
Applicable component levels
R900 PSY
UP
[{"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Product":{"code":"SSJT9L","label":"XL C\/C++"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"9.0","Edition":"","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}}]
Document Information
Modified date:
11 February 2009