Technical data

Cray Standard C/C++ Reference Manual
Compiler: Cray Standard C and Cray Standard C++
Operating System: UNICOS and UNICOS/mk
Scope: Local and global
3.1 Protecting Directives
To ensure that your directives are interpreted only by the Cray Standard C/C++
compilers, use the following coding technique in which directive represents the
name of the directive:
#if _CRAYC
#pragma _CRI directive
#endif
This ensures that other compilers used to compile this code will not interpret the
directive. Some compilers diagnose any directives that they do not recognize.
The Cray Standard C/C++ compilers diagnose directives that are not recognized
only if the
_CRI specification is used.
3.2 Directives in Cray Standard C++
C++ prohibits referencing undeclared objects or functions. Objects and functions
must be declared prior to using them in a #pragma directive. This is not always
the case with C.
Some #pragma directives take function names as arguments (for example:
#pragma align, #pragma soft, #pragma suppress, #pragma inline,
and #pragma noinline). No overloaded or member functions (no qualified
names) are allowed for these directives. This limitation does not apply to the
#pragma directives for template instantiation. This is described in Section 6.4,
page 114.
3.3 Loop Directives
Many directives apply to groups. Unless otherwise noted, these directives must
appear before a for, while,ordo...while loop. These directives may also
appear before a label for if...goto loops. If a loop directive appears before a
label that is not the top of an if...goto loop, it is ignored.
46 S217936