gcc/testsuite/g++.old-deja/g++.other/typedef7.C
raw| 1 | // { dg-do assemble } |
| 2 | // Origin: Mark Mitchell <[email protected]> |
| 3 | |
| 4 | typedef int I; |
| 5 | typedef int I; |
| 6 | |
| 7 | // DR56 makes clear that duplicate typedefs in class scopes are |
| 8 | // invalid. |
| 9 | |
| 10 | struct A { |
| 11 | typedef int I; // { dg-message "" } |
| 12 | typedef int I; // { dg-error "" } |
| 13 | }; |
| 14 | |
| 15 | template <class T> |
| 16 | struct S { |
| 17 | typedef int I; // { dg-message "" } |
| 18 | typedef int I; // { dg-error "" } |
| 19 | }; |
| 20 |