https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87038
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |diagnostic Status|UNCONFIRMED |NEW Last reconfirmed| |2018-08-21 Ever confirmed|0 |1 Severity|normal |enhancement --- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> --- Confirmed. Clang warns consistently, even at -O0: 87038.c:5:30: warning: variable 'foo' is used uninitialized whenever switch case is taken [-Wsometimes-uninitialized] case 0: ^ 87038.c:6:55: note: uninitialized use occurs here printf("foo is %d\n", foo); ^~~ 87038.c:4:25: note: variable 'foo' is declared here int foo = 3; ^ 1 warning generated.