Compiler Error C3035
OpenMP 'ordered' directive must bind directly to a 'for' or 'parallel for' directive with the 'ordered' clause
An ordered clause was ill formed.
The following sample generates C3035:
// C3035.cpp
// compile with: /openmp /link vcomps.lib
int main() {
int n = 0, x, i;
#pragma omp parallel private(n)
{
#pragma omp ordered // C3035
// Try the following line instead:
// #pragma omp for ordered
for (i = 0 ; i < 10 ; ++i)
;
}
}
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