Nous utilisons des cookies pour améliorer votre expérience de navigation. En savoir plus
Accepter
to the top

Webinar: Let's make a programming language. Part 1. Intro - 20.02

>
>
>
V3037. An odd sequence of...
menu mobile close menu
Additional information
toggle menu Contents

V3037. An odd sequence of assignments of this kind: A = B; B = A;

13 Déc 2015

The analyzer has detected a possible error that has to do with meaningless variable assignments.

Consider this example:

int a, b, c;
...
a = b;
c = 10;
b = a;

The "B = A" assignment statement in this code does not make sense. It might be a typo or just unnecessary operation. This is what the correct version of the code should look like:

a = b;
c = 10;
b = a_2;

You can look at examples of errors detected by the V3037 diagnostic.