Skip to content

Latest commit

 

History

History
31 lines (25 loc) · 839 Bytes

compiler-warning-level-1-c4441.md

File metadata and controls

31 lines (25 loc) · 839 Bytes
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: Compiler Warning (level 1) C4441
Compiler Warning (level 1) C4441
11/04/2016
C4441
C4441
7fc540a5-e41f-47cf-aa37-b2b699c2685e

Compiler Warning (level 1) C4441

calling convention of 'cc1' ignored; 'cc2' used instead

Member functions in managed user-defined types and global function generics must use the __clrcall calling convention. The compiler used __clrcall.

Example

The following sample generates C4441.

// C4441.cpp
// compile with: /clr /W1 /c
generic <class ItemType>
void __cdecl Test(ItemType item) {}   // C4441
// try the following line instead
// void Test(ItemType item) {}

ref struct MyStruct {
   void __cdecl Test(){}   // C4441
   void Test2(){}   // OK
};