https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112739
Yiming Xiang <kxiang at umich dot edu> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|variable 'a' is |Not emitting warning when |uninitialized when used |using an uninitialized |within its own |variable within its own |initialization |initialization --- Comment #1 from Yiming Xiang <kxiang at umich dot edu> --- This piece of code doesn't emit any warning with the following command: gcc -Wall -Werror -Wuninitialized #include <stdio.h> int main(){ int a = 8; { int a = a; printf("%d\n", a); } printf("%d\n", a); } Here a is used within its own initialization, so it should emit a warning (clang does)