PR lto/84212 - -Wno-* does not disable warnings from -flto link stage
[official-gcc.git] / gcc / testsuite / g++.dg / Wshadow.C
blob482d2f0309a243dd84868d46e7f4780dcfa2703e
1 // { dg-do compile }
2 // { dg-options "-Wshadow" }
3 // PR c++/57709 
4 class C {
5   int both_var; // { dg-message "declaration" }
6   void var_and_method(void) {} // { dg-message "declaration" }
7   void m() { 
8     int 
9       both_var,  // { dg-warning "shadows" }
10       var_and_method; 
11   }
12   void m2() { 
13     void (C::*var_and_method)(void); // { dg-warning "shadows" }
14   }