TICS Coding Standard Viewer 
TIOBE Software Quality Framework
Print-friendly version
©TIOBE Software www.tiobe.com
 
C++ Coding Standard
Search

Rule:  POR#014

Synopsis:Do not assume that a short is 16-bits
Language:C++
Severity Level:6
Category:Portability


Description:

According to [Stroustrup], the size of a short is defined as smaller or equal than the size of an int, but at least 16-bits. This means that the size of a short can be more than 16-bits. The size of the Windows types SHORT and USHORT is defined as 16-bits.