'identifier' : 'allocate( )' 僅適用於靜態範圍的數據項
備註
語法 __declspec( allocate()) 只能用於靜態數據。
Example
下列範例會產生 C2479:
// C2479.cpp
// compile with: /c
#pragma section("mycode", read)
static __declspec(allocate("mycode")) void DoNothing() {} // C2479
__declspec(allocate("mycode")) int i = 0; // OK