Next: 3 Class  Up: 2 General  Previous: High Integrity CPP Rule 2.1  Contents

High Integrity CPP Guideline 2.2   Specify in your compiler configuration that plain 'char' is implemented as 'unsigned char'.

Justification

Support 8-bit ASCII for internationalisation. The size and sign of char is implementation-defined. If the range of type char corresponds to 7-bit ASCII, and 8-bit characters are used, unpredictable behaviour may result. Otherwise prefer to use wchar_t type.

See also

Rule 8.4.5


HICPP VERSION 2.4  http://www.codingstandard.com   Copyright: © 2007 THE PROGRAMMING RESEARCH GROUP