Partager via


PREfast Warning 281 (Windows CE 5.0)

Send Feedback

281 - Incorrect order of operators.
Additional Information: Relational operators have higher precedence than bitwise operators.

This warning indicates a probable error in operator precedence.

Relational operators ( < > <= >= == != ) have higher precedence than bitwise operators (& | ^).

Example

Defective Source

int x = 3, y = 7, z = 13;

if (x & y != z) {;}

Corrected Source

int x = 17, y = 23, z = 31;

if ((x & y) != z) {;}

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.