Compiler Warning (level 1) C4190

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

A class, structure, or union was specified as the return type for a function or pointer to function, and the linkage was specified as extern "C". This is not illegal, but you must ensure that all calls made to this function occur from C++, and that the definition of the function is also in C++.

The following example causes this warning:

struct X
{
   int i;
   X ();
   virtual ~X ();
};

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