Compiler Error C3042
'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
{
}
}
}
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for