编译器错误 C2370
“identifier”: 重定义;不同的存储类
已使用不同的存储类声明标识符。
示例
下面的示例生成 C2370:
// C2370.cpp
// compile with: /Za /c
extern int i;
static int i; // C2370
int i; // OK
下面的示例生成 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