Skip to content

Latest commit

 

History

History
32 lines (25 loc) · 782 Bytes

compiler-warning-level-1-c4190.md

File metadata and controls

32 lines (25 loc) · 782 Bytes
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: Compiler Warning (level 1) C4190
Compiler Warning (level 1) C4190
11/04/2016
C4190
C4190
a4d0ad93-a19a-4063-addd-36d605831567

Compiler Warning (level 1) C4190

'identifier1' has C-linkage specified, but returns UDT 'identifier2' which is incompatible with C

A function or pointer to function has a UDT (user-defined type, which is a class, structure, enum, or union) as return type and extern "C" linkage. This is legal if:

  • All calls to this function occur from C++.

  • The definition of the function is in C++.

Example

// C4190.cpp
// compile with: /W1 /LD
struct X
{
   int i;
   X ();
   virtual ~X ();
};

extern "C" X func ();   // C4190