I'm confused about making a decision.
For example, when I wrote a code 'test.c' like this.
int main(void){
int b = 2;
int c = 0;
int d = b/c;
printf("d: %d\n", d);
return 0;
}
And then, I typed the command clang --analyze test.c
then the statement
warning: Division by zero [core.DivideZero]" appeared
After that, I typed the command clang test.c
. Then no warning comes out. However, when I run this program,
error Floating point exception(core dumped)
comes out.
In this case, which is the right one? is it a true-positive or false positive? Can someone explain it to me?