Compiler Error C3019
increment in OpenMP 'for' statement has improper form
The increment part of an OpenMP for
loop must use the index variable both on the left and right side of the operator.
The following sample generates C3019:
// C3019.cpp
// compile with: /openmp
int main()
{
int i = 0, j = 1, n = 3;
#pragma omp parallel
{
#pragma omp for
for (i = 0; i < 10; i = j + n) // C3019
// Try the following line instead:
// for (i = 0; i < 10; i++)
j *= 2;
}
}
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