HI,
I used the cppcheck with --debug to see the value flow. The target file is as below.
int func(int x) {
int y = 1 + x * x;
return y;
}
void main() {
func(1);
func(2);
}
I got the output from the cppcheck. I find that the possible values of x and x * x are listed, but why the token y is "always symbolic". Why the possible values of 'y' , '+', or '=' in the expression 'y = 1 + x * x' are no listed? Thanks!
HI,
I used the cppcheck with --debug to see the value flow. The target file is as below.
I got the output from the cppcheck. I find that the possible values of x and x * x are listed, but why the token y is "always symbolic". Why the possible values of 'y' , '+', or '=' in the expression 'y = 1 + x * x' are no listed? Thanks!
Good question.
For me, latest git HEAD says:
I get the same output as you with 2.16.0 and it's not optimal. I am not sure where/when it was fixed.