struct A {};

struct B
{
  typedef A T; // { dg-error "previous declaration" }
  friend struct T; // { dg-error "" }
};


syntax highlighted by Code2HTML, v. 0.9.1