Compiler Error C2370
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 C2370.
identifier' : redefinition; different storage class
The identifier is already declared with a different storage class.
The following sample generates C2370:
// C2370.cpp // compile with: /Za /c extern int i; static int i; // C2370 int i; // OK
The following sample generates C2370:
// C2370b.cpp #define Thread __declspec( thread ) extern int tls_i; int Thread tls_i; // C2370 declaration and the definition differ int tls_i; // OK
Show: