gcc/testsuite/g++.dg/warn/pr81119.C
raw| 1 | // PR c++/81119 Wshadow regression |
| 2 | // { dg-additional-options "-Wshadow" } |
| 3 | |
| 4 | struct A; |
| 5 | typedef A A; // No warning, does not hide |
| 6 | |
| 7 | struct B; // { dg-message "previous" } |
| 8 | typedef int B; // { dg-error "conflicting" } |
| 9 | |
| 10 | struct C; |
| 11 | void C (); // { dg-warning "hides constructor" } |
| 12 | void C (int); // warning not repeated |
| 13 | |
| 14 | struct D; |
| 15 | int D; // no warning, not a function |
| 16 | |
| 17 | struct E; |
| 18 | |
| 19 | enum X |
| 20 | {E}; // no warning, not a function |