共用方式為


編譯器錯誤 C3012

'intrinsic' : 內部函數不允許直接在平行區域內

區域中不允許 omp parallel 函式。 若要修正此問題,請將內部函數移出區域,或以非內部對等專案取代它們。

範例

下列範例會產生 C3012,並示範修正它的一種方式:

// C3012.cpp
// compile with: /openmp
#ifdef __cplusplus
extern "C" {
#endif
void* _ReturnAddress();
#ifdef __cplusplus
}
#endif

int main()
{
   #pragma omp parallel
   {
      _ReturnAddress();   // C3012
   }
   _ReturnAddress();      // OK
}