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

Rule:  POR#003Checked automatically with code checker

Synopsis:Do not assume that a char is signed or unsigned
Severity Level:4


In the definition of the C++ language, it has not yet been decided if a char is signed or unsigned. This decision has instead been left to each compiler manufacturer. If this is forgotten and this characteristic is exploited in one way or another, some difficult bugs may appear in the program when another compiler is used. Use signed char when you want a one-byte signed numeric type, and use unsigned char when you want a one-byte unsigned numeric type. Use plain old char when you want to hold characters.

Literature References:
Ellemtel P. Rec. 4