Consider this code:
LARGE_INTEGER l; size_t s; if (s < l.QuadPart) return 1; return 0;
When it is compiled under x64, it generates a C4018signed / unsigned mismatch compiler warning (ignore the warning of an uninitialized local variable).
C4018
A warning is wonderful because QuadPartthere is LONGLONGone that is signed and size_thas no sign.
QuadPart
LONGLONG
size_t
But when I compile it under 32-bit, is there no warning? How so? Under 32-bit LONGLONGis still signed and size_tnot specified.
32- LONGLONG signed __int64, size_t unsigned int. unsigned int , signed __int64, ( ) size_t signed __int64 , .
signed __int64
unsigned int
64- LONGLONG signed __int64, size_t unsigned __int64, size_t LONGLONG, - , , .
unsigned __int64
Source: https://habr.com/ru/post/1717430/More articles:How to prevent SlideToggle function queue? - jqueryЗамок Виндзор: Как получить прокси для конкретного экземпляра? - c#How to determine if it is communicating with Indy? - delphiIs it possible to reprogram the keyboard? - embeddedОтображение Nhibernate без id - c#Why couldn't I work with the gcc compiler without '\ n' in printf? - cFluentNHibernate for Dictionary - nhibernateVisual Basic Vs Dreamweaver CS4 - dreamweaverHow to implement a menu in the style of a Snow Leopard dock? - objective-cIs it possible to know exactly which numpad key is pressed in AS3 (with Num Lock disabled)? - flexAll Articles