diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/warn/pr81119.C')
-rw-r--r-- | gcc/testsuite/g++.dg/warn/pr81119.C | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/warn/pr81119.C b/gcc/testsuite/g++.dg/warn/pr81119.C new file mode 100644 index 00000000000..2f822361e2b --- /dev/null +++ b/gcc/testsuite/g++.dg/warn/pr81119.C @@ -0,0 +1,20 @@ +// PR c++/81119 Wshadow regression +// { dg-additional-options "-Wshadow" } + +struct A; +typedef A A; // No warning, does not hide + +struct B; // { dg-message "previous" } +typedef int B; // { dg-error "conflicting" } + +struct C; +void C (); // { dg-warning "hides constructor" } +void C (int); // warning not repeated + +struct D; +int D; // no warning, not a function + +struct E; + +enum X + {E}; // no warning, not a function |