// PR c++/27496
// { dg-do compile }

template<int> struct A
{
  template<void> friend class X;  // { dg-error "void" }
};

A<0> a; 


syntax highlighted by Code2HTML, v. 0.9.1