Compiler Warning (level 4) C4365
Collapse the table of content
Expand the table of content
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer

Compiler Warning (level 4) C4365

Error Message

'action' : conversion from 'type_1' to 'type_2', signed/unsigned mismatch

For example, you tried to convert an unsigned value to a signed value.

C4365 is off by default. For more information, see Compiler Warnings That Are Off by Default.


The following sample generates C4365.

// C4365.cpp
// compile with: /W4
#pragma warning(default:4365)

int f(int) { return 0; }
void Test(size_t i) {}

int main() {
   unsigned int n = 10;
   int o = 10;
   f(n);   // C4365
   f(o);   // OK

   Test( -19 );   // C4365
© 2015 Microsoft