![]() |
![]() |
1254 | ![]() |
||||
![]() | |||||||
| Constants | |||||||
This constant is suffixed with "L" or "U" but its type is actually unsigned long. Would a "UL" suffix be more appropriate ? Note that the type of an integer constant depends on its value and the implemented size of an int (e.g. whether it is a 16 bit or 32 bit quantity) as well as the presence of suffixes. More ... For example:
/*PRQA S 1277,1278,1279,1281,2017,3112,3120,3198,3408,3447 ++*/
/********************************
* OPTIONS: -s int=16
********************************/
extern void foo(void)
{
2147483648L; /* Message 1254 */
2147483648U; /* Message 1254 */
0x80000000L; /* Message 1254 */
0x80000000U; /* Message 1254 */
65536U; /* Message 1254 */
0x10000U; /* Message 1254 */
}
![]() | ||
| QA·C Source Code Analyser 8.1.2
© 2013 Programming Research. www.programmingresearch.com | Personality Groups | Glossary | Message Index | Contents |