HP C A.06.05 Reference Manual

Program Organization
Lexical Elements
Chapter 216
char
int
enum
long
long long
short
Whether or not char is signed or unsigned by default is implementation-defined. The signed
keyword lets you explicitly declare (in a portable) way a signed char.
sizeof
See “sizeof Operator” on page 131.
static
A variable that has memory allocated for it at program startup time. The variable is
associated with a single memory location until the end of the program.
struct
See “Structure and Union Tags” on page 49.
switch
See “switch” on page 178.
__thread
The __thread keyword defines a thread specific data variable, distinguishing it from other
data items that are shared by all threads. With a thread-specific data variable, each thread
has its own copy of the data item. These variables eliminate the need to allocate
thread-specific data dynamically, thus improving performance.
This keyword is implemented as an HP-specific type qualifier, with the same syntax as const
and volatile, but not the same semantics. Syntax examples:
__thread int j=2;
int main()
{
j = 20;
}