Here is a minimal case. Compile with "/ openmp" on Visual C ++ 2015.
#include <vector>
void main()
{
bool foo = false;
#pragma omp flush (foo)
std::vector<int> bar;
}
I get:
C2146 syntax error : missing ';' before identifier 'bar'
C2275 'std::vector<int,std::allocator<_Ty>>' : illegal use of this type as an expression
C2065 'bar' : undeclared identifier
If I comment #pragma, the error will disappear.
If I replaced std::vectorwith int, the error will disappear.
If I put a ;on the line below #pragma, the error will disappear.
source
share