Intel® C++ Compiler Classic Developer Guide and Reference

ID 767249
Date 12/16/2022
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

Intel-supported Pragma Reference

The Intel® C++ Compiler Classic supports the following pragmas to ensure compatibility with other compilers.

Pragmas Compatible with the Microsoft* Compiler

The following pragmas are compatible with the Microsoft Compiler. For more information about these pragmas, go to the Microsoft Developer Network (http://msdn.microsoft.com).

Pragma

Description

alloc_text

Names the code section where the specified function definitions are to reside.

auto_inline

Excludes any function defined within the range where off is specified from being considered as candidates for automatic inline expansion.

bss_seg

Indicates to the compiler the segment where uninitialized variables are stored in the .obj file.

check_stack

The on argument indicates that stack checking should be enabled for functions that follow and the off argument indicates that stack checking should be disabled for functions that follow.

code_seg

Specifies a code section where functions are to be allocated.

OpenMP* Standard Pragmas

The Intel® C++ Compiler Classic currently supports OpenMP* 5.0 Version TR4, and some OpenMP Version 5.1 pragmas. Supported pragmas are isted below. For more information about these pragmas, reference the OpenMP* Version 5.1 specification.

Intel-specific clauses are noted in the affected pragma description.

Pragma

Description

omp atomic

Specifies a computation that must be executed atomically.

omp barrier

Specifies a point in the code where each thread must wait until all threads in the team arrive.

omp cancel

Requests cancellation of the innermost enclosing region of the type specified, and causes the encountering task to proceed to the end of the cancelled construct.

omp cancellation point

Defines a point at which implicit or explicit tasks check to see if cancellation has been requested for the innermost enclosing region of the type specified. This construct does not implement a synchronization between threads or tasks.

omp critical

Specifies a code block that is restricted to access by only one thread at a time.

Pragmas Compatible with Other Compilers

The following pragmas are compatible with other compilers. For more information about these pragmas, see the documentation for the specified compiler.

Pragma

Description

include_directory

HP-compatible pragma. It appends the string argument to the list of places to search for #include files.

poison

GCC-compatible pragma. It labels the identifiers you want removed from your program; an error results when compiling a "poisoned" identifier; #pragma POISON is also supported.

options

GCC-compatible pragma; It sets the alignment of fields in structures.

weak

GCC-compatible pragma, it declares the symbol you enter to be weak.

See Also