URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 301 |
Rev 384 |
// PR c++/34488
|
// PR c++/34488
|
// { dg-do compile }
|
// { dg-do compile }
|
|
|
struct A
|
struct A
|
{
|
{
|
A ();
|
A ();
|
~A ();
|
~A ();
|
A (const A &);
|
A (const A &);
|
};
|
};
|
|
|
struct B
|
struct B
|
{
|
{
|
friend A::A ();
|
friend A::A ();
|
friend A::~A ();
|
friend A::~A ();
|
friend A::A (const A &);
|
friend A::A (const A &);
|
};
|
};
|
|
|
struct C
|
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 (); // { 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" }
|
friend int C (const C &); // { dg-error "return type|in friend decl" }
|
};
|
};
|
|
|
struct D
|
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 () {} // { 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" }
|
friend int D (const D &) {} // { dg-error "return type|in friend decl" }
|
};
|
};
|
|
|
struct E
|
struct E
|
{
|
{
|
friend A::A () {} // { dg-error "cannot define member" }
|
friend A::A () {} // { dg-error "cannot define member" }
|
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" }
|
friend A::A (const A &) {} // { dg-error "cannot define member" }
|
};
|
};
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.