编译器错误 C2093
“variable1”:不能使用自动变量“variable2”的地址来初始化
在使用 /Za 编译时,程序尝试了使用自动变量的地址来作为初始化表达式。
下面的示例生成 C2093:
// C2093.c
// compile with: /Za /c
void func() {
int li; // an implicit auto variable
int * s[]= { &li }; // C2093 address is not a constant
// OK
static int li2;
int * s2[]= { &li2 };
}
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈