使用的非標準延伸模組:將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)。