description | title | ms.date | f1_keywords | helpviewer_keywords | ms.assetid | ||
---|---|---|---|---|---|---|---|
Learn more about: Compiler Error C3042 |
Compiler Error C3042 |
11/04/2016 |
|
|
bf73f61e-5bd2-40a8-9b06-6244e6a15a41 |
'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
{
}
}
}