Compiler Error C3055
'symbol' : symbol cannot be referenced before it is used in 'threadprivate' directive
A symbol was referenced and then used in a threadprivate clause, which is not allowed.
The following sample generates C3055:
// C3055.cpp
// compile with: /openmp
int x, y;
int z = x;
#pragma omp threadprivate(x, y) // C3055
void test() {
#pragma omp parallel copyin(x, y)
{
x = y;
}
}
Possible resolution:
// C3055b.cpp
// compile with: /openmp /LD
int x, y, z;
#pragma omp threadprivate(x, y)
void test() {
#pragma omp parallel copyin(x, y)
{
x = y;
}
}
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