summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/parse/error29.C
blob: 2c3a3a7f28880458207096dd43263927fac82da0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// { dg-options "-fshow-column -ansi -pedantic-errors -Wno-long-long" }
// PR c++/25637

struct A { 
  void foo();
  A(); 
  void operator delete(void *);
};
struct B { 
  friend void A::foo() {} // { dg-error "22:cannot define member function 'A::foo' within 'B'" }
  friend void A::operator delete(void*) {} // { dg-error "39:cannot define member function 'A::operator delete' within 'B'" }
  friend A::A() {} // { dg-error "15:cannot define member function 'A::A' within 'B'" }
};