编译器警告(等级 3)C4159
#pragma %s(pop,…):已弹出先前推送的标识符“identifier”
注解
源代码中包含一个带有 pragma 的标识符的 push 指令,后跟一个没有标识符的 pop 指令。 因此,标识符将被弹出,并且标识符的后续使用可能会导致意外行为。
示例
若要避免此警告,请提供 pop 指令中的标识符。 例如:
// C4159.cpp
// compile with: /W3
#pragma pack(push, f)
#pragma pack(pop) // C4159
// using the identifier resolves the warning
// #pragma pack(pop, f)
int main()
{
}