编译器错误 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
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈