使用了非标准扩展:将“extern”重新定义为“static”
注解
使用默认的 Microsoft 扩展 (/Ze),可以将 extern 标识符重定义为 static。
示例
以下示例生成 C4211:
// C4211.c
// compile with: /W4
extern int i;
static int i; // C4211
int main()
{
}
根据 ANSI 兼容性 (/Za),此类重定义无效。
使用了非标准扩展:将“extern”重新定义为“static”
使用默认的 Microsoft 扩展 (/Ze),可以将 extern 标识符重定义为 static。
以下示例生成 C4211:
// C4211.c
// compile with: /W4
extern int i;
static int i; // C4211
int main()
{
}
根据 ANSI 兼容性 (/Za),此类重定义无效。