URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [parse/] [friend7.C] - Rev 704
Go to most recent revision | Compare with Previous | Blame | View Log
// PR c++/34488
// { dg-do compile }
struct A
{
A ();
~A ();
A (const A &);
};
struct B
{
friend A::A ();
friend A::~A ();
friend A::A (const A &);
};
struct C
{
friend int C (); // { dg-error "return type|in friend decl" }
friend int ~C (); // { dg-error "return type|in friend decl" }
friend int C (const C &); // { dg-error "return type|in friend decl" }
};
struct D
{
friend int D () {} // { dg-error "return type|in friend decl" }
friend int ~D () {} // { dg-error "return type|in friend decl" }
friend int D (const D &) {} // { dg-error "return type|in friend decl" }
};
struct E
{
friend A::A () {} // { dg-error "cannot define member" }
friend A::~A () {} // { dg-error "cannot define member" }
friend A::A (const A &) {} // { dg-error "cannot define member" }
};
Go to most recent revision | Compare with Previous | Blame | View Log