This diagnostic rule was added at users' request.
The analyzer allows you to detect some strange binary operations where code can be simplified.
Suspicious binary operations are:
The V2007 diagnostic rule helps to perform code refactoring and sometimes detect errors.
These are examples of constructs that cause this diagnostic message to appear:
int X = 1 ^ 0;
int Y = 2 / X;
This code can be simplified. For example:
int X = 1;
int Y = 2;
To reduce the number of false positives, we have added several exceptions. For example, the V2007 diagnostic message is not generated when the strange expression is located inside a macro or is an array index.
This diagnostic is classified as:
Was this page helpful?
Your message has been sent. We will email you at
If you do not see the email in your inbox, please check if it is filtered to one of the following folders:
Take
a chance!