Discuss the OpenMP 3.0 API Specifications with the OpenMP Arch. Review Board. (Read Only)
- Posts: 5
- Joined: Thu Jan 28, 2010 7:38 am
Is the C99 _Pragma supported by OpenMP? The more common #pragma is first discussed on Page #21:
In C/C++, OpenMP directives are specified by using the #pragma mechanism provided by the C and C++ standards.
Which could imply that a compliant OpenMP c99 compiler would translate something like:
and so be compliant.
As well as being an operator, it can appear as a result of macro expansion; e.g.
Code: Select all
#define PARFOR _Pragma("omp parallel for")
In any case, I only have gcc, which does appear to support the use of _Pragma like this for OpenMP. Is this well supported? Do other C99 compilers also support _Pragma?
TO my understanding, independently of OpenMP, a C99 compiler must support both forms, the #pragma directive and the _Pragma unary operator. Thus, it seems to be a matter of C99 compliance of each compiler. You should check with compiler vendor or developer organization. Documentation is available online for most compilers.