This documentation is archived and is not being maintained.

Compiler Error C3004

Error Message

'clause' : clause not valid on OpenMP 'directive' directive

An OpenMP clause was used on a directive for which it is not enabled.

The following sample generates C3004:

// C3004.c
// compile with: /openmp
int main()
{
   int x, y, z;

   // Shared clause not allowed for 'single' directive.
   #pragma omp single shared(x, y)   // C3004

   x = y;
}
Show: