Export (0) Print
Expand All
Expand Minimize

Compiler Error C3042

Error Message

'copyprivate' and 'nowait' clauses cannot appear together on OpenMP 'directive' directive

The copyprivate and nowait clauses are mutually exclusive on the specified directive. To fix this error, remove one or both of the copyprivate or nowait clauses.

The following sample generates C3042:

// C3042.cpp
// compile with: /openmp /c
#include <stdio.h>
#include "omp.h"

double d;

int main() {
    #pragma omp parallel private(d)
   {
      #pragma omp single copyprivate(d) nowait   // C3042
      {
      }
   }
}

Community Additions

ADD
Show:
© 2014 Microsoft