编译器警告(等级 4)C4232

使用了非标准扩展:“identifier”:dllimport“dllimport”的地址是非静态的,不保证标识

在 Microsoft 扩展 (/Ze) 下,可以将非静态值作为用 dllimport 修饰符声明的函数的地址。 在 ANSI 兼容性 (/Za) 下,这会导致错误。

下面的示例生成 C4232:

// C4232.c
// compile with: /W4 /Ze /c
int __declspec(dllimport) f();
int (*pfunc)() = &f;   // C4232