Intel® oneAPI DPC++/C++ Compiler Developer Guide and Reference

ID 767253
Date 7/13/2023
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® oneAPI DPC++/C++ Compiler 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.

bss_seg

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

code_seg

Specifies a code section where functions are to be allocated.

comment

Places a comment record into an object file or executable file.

component

Controls collecting of browse information or dependency information from within source files.

OpenMP* Standard Pragmas

The Intel oneAPI DPC++/C++ Compiler 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 allocate

Specifies memory allocators to use for object allocation and deallocation.

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.

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

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