Compiler Error C3012
Visual Studio 2015
The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.
The latest version of this topic can be found at Compiler Error C3012.
intrinsic' : intrinsic function not allowed directly within a parallel region
A compiler intrinsic function is not allowed in an omp``parallel region.
The following sample generates C3012:
// C3012.cpp
// compile with: /openmp
#ifdef __cplusplus
extern "C"
{
#endif
void* _ReturnAddress();
#ifdef __cplusplus
}
#endif
int main()
{
_ReturnAddress(); // OK
#pragma omp parallel
{
_ReturnAddress(); // C3012
}
}
Show: