Skip to content

Latest commit

 

History

History
28 lines (23 loc) · 917 Bytes

compiler-error-c3052.md

File metadata and controls

28 lines (23 loc) · 917 Bytes
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: Compiler Error C3052
Compiler Error C3052
11/04/2016
C3052
C3052
87480c42-1ceb-4775-8d20-88c54a7bb6a6

Compiler Error C3052

'var' : variable doesn't appear in a data-sharing clause under a default(none) clause

If default(none) is used, any variable used in the structured block must be explicitly specified as either shared or private.

The following sample generates C3052:

// C3052.cpp
// compile with: /openmp /c
int main() {
   int n1 = 1;

   #pragma omp parallel default(none) // shared(n1) private(n1)
   {
      n1 = 0;   // C3052 use either a shared or private clause
   }
}