re PR c++/68374 (G++ -Wshadow doesn't warn about static member shadowing)
[official-gcc.git] / gcc / testsuite / g++.dg / warn / Wshadow-13.C
blobd75560c8e9ed14ab16ac22e9499835453fef6741
1 // PR c++/68374
2 // { dg-options "-Wshadow" }
4 class f {
5   static int mVar;  // { dg-message "shadowed declaration" }
6   int g(int x) { int mVar=3; return x+mVar; }  // { dg-warning "shadows a member of 'f'" }
7 };
8 int f::mVar = 1;