http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57709
--- Comment #8 from Jan Kratochvil <jan.kratochvil at redhat dot com> --- Created attachment 31248 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31248&action=edit Comment 7 patch as a file I still get both warnings, applied the patch to: g++ (GCC) 4.9.0 20131119 (experimental) shadow2.C: In member function ‘void C::m()’: shadow2.C:4:18: warning: declaration of ‘both_var’ shadows a member of ‘C’ [-Wshadow] void m() { int both_var, var_and_method; } ^ shadow2.C:2:7: note: shadowed declaration is here int both_var; ^ shadow2.C:4:28: warning: declaration of ‘var_and_method’ shadows a member of ‘C’ [-Wshadow] void m() { int both_var, var_and_method; } ^ shadow2.C:3:8: note: shadowed declaration is here void var_and_method() {} ^ shadow2.C:4:18: warning: unused variable ‘both_var’ [-Wunused-variable] void m() { int both_var, var_and_method; } ^ shadow2.C:4:28: warning: unused variable ‘var_and_method’ [-Wunused-variable] void m() { int both_var, var_and_method; } ^