編譯器錯誤 C2193
'identifier' : 已經在區段中
函 alloc_text
式使用和 code_seg
pragmas 放置在兩個不同的區段中。
下列範例會產生 C2193:
// C2193.cpp
// compile with: /c
extern "C" void MYFUNCTION();
#pragma alloc_text(MYCODE, MYFUNCTION)
#pragma code_seg("MYCODE2")
extern "C" void MYFUNCTION() {} // C2193
extern "C" void MYFUNCTION2() {}