[Bug c/105210] gcc/auto-profile.cc:391:11: warning: variable 'level' set but not used

2022-04-10 Thread dcb314 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105210 --- Comment #2 from David Binderman --- It seems that recent gcc trunk can't detect set-but-not-used in this code: extern int g( int); void f( int m) { int n; n = 0; for (int i = 0; i < m; ++i) {

[Bug c/105210] gcc/auto-profile.cc:391:11: warning: variable 'level' set but not used

2022-04-10 Thread dcb314 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105210 --- Comment #1 from David Binderman --- It would appear that clang trunk is better at finding set-but-not-used variables than gcc. Here are some more cases: ./../trunk.git/gcc/genautomata.cc:5664:7: warning: variable 'alts_number' set but not