Share via


컴파일러 경고 C4950

'type_or_member': 사용되지 않는 것으로 표시되었습니다.

멤버 또는 형식이 특성과 함께 ObsoleteAttribute 사용되지 않는 것으로 표시되었습니다.

C4950은 항상 오류로 실행됩니다. 경고 pragma 지시문 또는 /wd 컴파일러 옵션을 사용하여 이 경고를 끌 수 있습니다.

예시

다음 샘플에서는 C4950을 생성합니다.

// C4950.cpp
// compile with: /clr
using namespace System;

// Any reference to Func3 should generate an error with message
[System::ObsoleteAttribute("Will be removed in next version", true)]
Int32 Func3(Int32 a, Int32 b) {
   return (a + b);
}

int main() {
   Int32 MyInt3 = ::Func3(2, 2);   // C4950
}