﻿# V8011\. An identical expression to the left and to the right of a compound assignment\.

The analyzer has detected that identical expressions surround a compound assignment operator\. The operation may be incorrect and redundant, or it can be simplified\.

The example:

```cpp
x -= x - 5
```

In this case, the expression assigns the `5` value to the `x` variable\. Most likely, the intended operation is to subtract `5` from the `x` variable\. 

The fixed code:

```cpp
x = x - 5
```

Another option:

```cpp
x -= 5
```

The diagnostic rule also applies to the following operators: `+=`, `*=`, `/=`, and `%=`\.