﻿# V7003\. A condition is equivalent to a condition in an 'else if' statement, making it unreachable\.

The analyzer has detected duplicate conditions in an if and else if statements' chain\. The code in the repeated condition will never execute, which indicates an error\.

The example:

```cpp
if (a == 1) {
  foo();
} else if (a == 2) {
  bar();
} else if (a == 1) {
  baz();
}
```

In this example, the call to `baz()` is unreachable, since control flow never reaches it\. This is probably a logic error, and the fixed code should look like this:

```cpp
if (a == 1) {
  foo();
} else if (a == 2) {
  bar();
} else if (a == 3) {
  baz();
}
```

Non\-identical but equivalent expressions are also taken into account\. The example:

```cpp
if (a & b) {
  foo();
} else if (b & a) {
  bar();
}
```

This code triggers a warning because a bitwise `AND` is commutative, so the result will be the same\.