![]() |
![]() |
1251 | ![]() |
||||
![]() | |||||||
| Arithmetic type - Balancing | |||||||
A suffixed integer constant is one operand of a binary operator for which type balancing occurs. Message 1251 is generated to identify the fact that this constant causes the other (non-constant) operand to undergo an implicit type conversion. 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 1278,2017,2104,2213,3120,3227,3408,3602 ++*/
extern void foo( signed char sca, int sia )
{
if ( sca < 12U ) { } /* Message 1251 + 3760 - Implicit conversion int to unsigned int */
if ( sia < 1234U ) { } /* Message 1251 + 3760 - Implicit conversion int to unsigned int */
}
![]() | ||
| QA·C Source Code Analyser 8.1.2
© 2013 Programming Research. www.programmingresearch.com | Personality Groups | Glossary | Message Index | Contents |