V2523. MISRA. All integer constants of unsigned type should have 'u' or 'U' suffix.

This diagnostic rule is based on the software development guidelines developed by MISRA (Motor Industry Software Reliability Association).

The analyzer has detected an unsigned integer literal without a 'U' / 'u' suffix ('U' in C++). Such literals obscure the code as their type is ambiguous. Besides, the same literals can be of different types in various data models.

Using suffixes to explicitly specify the type helps to avoid ambiguity when reading numeric literals.

Here is an example of code triggering the warning (provided that the literal is of unsigned type on the platform under analysis):

auto typemask = 0xffffffffL;


Bugs Found

Checked Projects
409
Collected Errors
14 072
This website uses cookies and other technology to provide you a more personalized experience. By continuing the view of our web-pages you accept the terms of using these files. If you don't want your personal data to be processed, please, leave this site. Learn More →
Accept