summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/diagnostic/aka1.C
blob: 37f8df9399d251128fbf8645ab17f61217009239 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// Basic test for typedef stripping in diagnostics.

struct A {
  void f();
};

void A::f() {
  // We don't want an aka for the injected-class-name.
  A a = 0;			// { dg-error "type .A. requested" }
}

typedef A B;

// We do want an aka for a real typedef.
B b = 0;			// { dg-error "B .aka A." }