A “u” or “U” suffix shall be applied to all integer constants that are represented in an unsigned type
A “u” or “U” suffix shall be applied to all integer constants that are represented in an unsigned type.
The signedness of a constant is determined from:
Value of the constant.
Base of the constant: octal, decimal or hexadecimal.
Size of the various types.
Any suffixes used.
Unless you use a suffix u or U,
another developer looking at your code cannot determine easily whether
a constant is signed or unsigned.
If you expect a rule violation but do not see it, refer to Coding Standard Violations Not Displayed.
| Group: Literals and Constants |
| Category: Required |
| AGC Category: Readability |