Compiler Error C3008

 

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 C3008.

arg' : argument is missing closing ')' on OpenMP 'directive' directive

An OpenMP directive that takes an argument did not have a closing parenthesis.

The following sample generates C3008:

// C3008.c  
// compile with: /openmp  
int main()  
{  
   int x, y, z;  
   #pragma omp parallel shared(x   // C3008  
   // Try the following line instead:  
   #pragma omp parallel shared(x)  
   {  
   }  
}  

Show: