https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87038
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> --- And for the goto case Clang says: 87038.c:2:13: warning: variable 'foo' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized] if (x == 0) goto lbl; ^~~~~~ 87038.c:5:31: note: uninitialized use occurs here printf("foo is %d\n", foo); ^~~ 87038.c:2:9: note: remove the 'if' if its condition is always false if (x == 0) goto lbl; ^~~~~~~~~~~~~~~~~~~~ 87038.c:3:9: note: variable 'foo' is declared here int foo = 3; ^ 1 warning generated.