Compiler Error C3004
Visual Studio 2015
The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.
The latest version of this topic can be found at Compiler Error C3004.
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: