![]() |
![]() |
0493 | ![]() |
||||
![]() | |||||||
| Constraint violations | REFERENCE - ISO:C90-6.3.5 Multiplicative Operators - Constraints | ||||||
This is a constraint error The type of the left hand operand is not compatible with this operation. The types of operand that can be used with any particular operator are restricted, so for example:
| * / | Both operands must be of arithmetic type |
| + | Both operands must be of arithmetic type ... or, one operand must be a pointer to an object and the other must be of integral type |
| - | Both operands must be of arithmetic type ... or, both operands must be pointers to qualified or unqualified versions of compatible object types ... or, the left operand must be a pointer to an object type and the right operand must have integral type |
| < <= >= > | Both operands must be of arithmetic type ... or, both operands must be pointers to qualified or unqualified versions of compatible object types ... or, both operands must be pointers to qualified or unqualified versions of compatible incomplete types |
| == != | Both operands must be of arithmetic type ... or, both operands must be pointers to qualified or unqualified versions of compatible types ... or, one operand must be a pointer to an object or incomplete type and the other must be a pointer to a qualified or unqualified version of void ... or, one operand must be a pointer and the other must be a null pointer constant |
/*PRQA S 2213,2216,3120,3199,3203,3408,3447 ++*/
struct ST {int a; int b;};
extern struct ST sta;
extern struct ST stb;
extern int *pi;
void foo(void)
{
int r;
if (sta == stb) /* Message 0493 and also 0494 */
{
}
r = pi * 2; /* Message 0493 */
}
See also:
![]() | ||
| QA·C Source Code Analyser 8.1.2
© 2013 Programming Research. www.programmingresearch.com | Personality Groups | Glossary | Message Index | Contents |