This documentation is archived and is not being maintained.

Compiler Error C3029

Error Message

'symbol' : can only appear once in data-sharing clauses in an OpenMP directive

A symbol was used more than once in one or more clauses in a directive. The symbol can only be used once in the directive.

The following sample generates C3029:

// C3029.cpp
// compile with: /openmp /link vcomps.lib
#include "omp.h"

int g_i;

int main() {
   int i, x;

   #pragma omp parallel reduction(+ : x, x)   // C3029
      ;

   #pragma omp parallel reduction(+ : x)   // OK
      ;

   #pragma omp parallel private(x) reduction(+ : x)   // C3029
      ;

   #pragma omp parallel reduction(+ : x)   // OK
      ;
}
Show: