gcc编译器忽略uninitialized variable warning调试构建。这对我来说看起来很奇怪,有人可以帮助我理解这一点吗?
## Program \n#include <stdio.h>\n#include <stdarg.h>\n#include <stdlib.h>\n\nint main(int argc, char *argv[])\n{\n int i, max;\n int count;\n if (argc < 2) {\n return -1;\n }\n max = atoi(argv[1]);\n for (i = 0; i < max; i++) {\n count++;\n }\n printf("count is %d\\n", count);\n return 0;\n}\nRun Code Online (Sandbox Code Playgroud)\n\n无警告
\n\na.c: In function \xe2\x80\x98main\xe2\x80\x99:\na.c:8:9: error: \xe2\x80\x98count\xe2\x80\x99 may be used uninitialized in this function [-Werror=maybe-uninitialized]\n int count;\n ^~~~~\ncc1: all warnings being treated as errors\nRun Code Online (Sandbox Code Playgroud)\n\ngcc版本:7.4.0