Object code control

Table 1. Object code control pragmas
Pragma Description
#pragma arch_section (IBM extension)

Overrides the architecture of a statement in the source file. This pragma directive enables your program to leverage specific hardware features like using newer and faster instructions through built-ins or compiler generated instructions based on the architecture sections within the source file. You do not need to maintain code customized for a specific hardware model in separate source files. This pragma directive reduces the overhead of the call to an external routine and permits code for different machine architectures to coexist in one source file.

#pragma comment

Places a comment into the object module.

#pragma csect

Identifies the name for the code, static, or test control section (CSECT) of the object module.

#pragma environment (C only)

Uses C code as an assembler substitute.

#pragma export

Declares that an external function or variable is to be exported.

#pragma hashome (C++ only)

Informs the compiler that the specified class has a home module that will be specified by #pragma ishome.

#pragma insert_asm (C only)

Enables users to provide additional assembler statements that are inserted into the compiler-generated High-Level Assembler (HLASM) code.

#pragma ishome (C++ only)

Informs the compiler that the specified class's home module is the current compilation unit.

#pragma linkage (C only)

Identifies the entry point of modules that are used in interlanguage calls from C programs as well as the linkage or calling convention that is used on a function call.

#pragma longname/nolongname

Specifies whether the compiler is to generate mixed-case names that can be longer than 8 characters in the object module.

#pragma map

Converts all references to an identifier to another, externally defined identifier.

#pragma pack

Sets the alignment of all aggregate members to a specified byte boundary.

#pragma priority (C++ only)

Specifies the priority level for the initialization of static objects.

#pragma prolog (C only), #pragma epilog (C only)

When used with the METAL option, inserts High-Level Assembly (HLASM) prolog or epilog code for a specified function.

#pragma strings

Specifies the storage type for string literals.

#pragma target (C only)

Specifies the operating system or runtime environment for which the compiler creates the object module.

#pragma variable

Specifies whether the compiler is to use a named external object in a reentrant or non-reentrant fashion.