#include <stdio.h> void main(){ int n = 0; void inner1(){ int a = 10 / n; printf("a=%d\n", a); } void inner2(){ n = 2; } inner2(); inner1(); }
Cppcheck says Division by zero but n is 2.
That seems to be a GNU extension which is not supported by cppcheck.
Log in to post a comment.
Cppcheck says Division by zero but n is 2.
That seems to be a GNU extension which is not supported by cppcheck.