// PR c++/104379 // { dg-do compile } // { dg-options "-Wshadow" } int x; template struct S { int i; S(int i) { (void) i; } // { dg-warning "declaration of 'i' shadows a member of 'S'" } S(float x) { (void) x; } // { dg-warning "declaration of 'x' shadows a global declaration" } S(int *p) { int a = 1; (void) p; (void) a; { int a = 2; (void) a; } } // { dg-warning "declaration of 'a' shadows a previous local" } }; S i(1); S j(1); S k(1.0f); S l(1.0f); S m(&x); S n(&x);