summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.other/typedef7.C
blob: 42cf4f1c5e23a55901da6c1bc5d2b7806a8a85e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// { dg-do assemble  }
// Origin: Mark Mitchell <mark@codesourcery.com>

typedef int I;
typedef int I;

// DR56 makes clear that duplicate typedefs in class scopes are
// invalid.

struct A {
  typedef int I; // { dg-error "" }
  typedef int I; // { dg-error "" }
};

template <class T>
struct S {
  typedef int I;  // { dg-error "" }
  typedef int I;  // { dg-error "" }
};