https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95136
Martin Sebor <msebor at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution|--- |FIXED Target Milestone|--- |11.0 --- Comment #3 from Martin Sebor <msebor at gcc dot gnu.org> --- GCC 11 detects both accesses: pr95136.c: In function ‘f’: pr95136.c:5:10: warning: ‘a’ is used uninitialized [-Wuninitialized] 5 | return *p; // -Wuninitialized | ^~ pr95136.c:3:7: note: ‘a’ declared here 3 | int a[4]; | ^ pr95136.c: In function ‘g’: pr95136.c:12:10: warning: ‘a’ is used uninitialized [-Wuninitialized] 12 | return *p; // missing warning | ^~ pr95136.c:10:7: note: ‘a’ declared here 10 | int a[4]; | ^