![]() |
![]() |
4115 | ![]() |
||||
![]() | |||||||
| Arithmetic type - Operands | REFERENCE - ISO:C90-6.3.13 Logical AND Operator, ISO:C90-6.3.14 Logical OR Operator | ||||||
An operand of this logical && or logical || operator is not an effectively Boolean expression. The ISO;C90 language does not support an explicitly Boolean type. Type _Bool was introduced in ISO:C99 but is not recognised in the current version of QA·C. In both versions of the language, there exist a number of operators which always yield a value of either 0 or 1 which is of type int. These operators are:
/*PRQA S 1278,2017,2213,3120,3198,3199,3203,3408,3447 ++*/
extern unsigned int ui;
extern unsigned int uj;
extern void foo(void)
{
if ((ui != 0U) && (uj > 0U)) { } /* */
if ((ui > 10U) || uj) { } /* Message 4115 */
return;
}
See also:
![]() | ||
| QA·C Source Code Analyser 8.1.2
© 2013 Programming Research. www.programmingresearch.com | Personality Groups | Glossary | Message Index | Contents |