OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [parse/] [friend7.C] - Blame information for rev 774

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// PR c++/34488
2
// { dg-do compile }
3
 
4
struct A
5
{
6
  A ();
7
  ~A ();
8
  A (const A &);
9
};
10
 
11
struct B
12
{
13
  friend A::A ();
14
  friend A::~A ();
15
  friend A::A (const A &);
16
};
17
 
18
struct C
19
{
20
  friend int C ();              // { dg-error "return type|in friend decl" }
21
  friend int ~C ();             // { dg-error "return type|in friend decl" }
22
  friend int C (const C &);       // { dg-error "return type|in friend decl" }
23
};
24
 
25
struct D
26
{
27
  friend int D () {}            // { dg-error "return type|in friend decl" }
28
  friend int ~D () {}           // { dg-error "return type|in friend decl" }
29
  friend int D (const D &) {}   // { dg-error "return type|in friend decl" }
30
};
31
 
32
struct E
33
{
34
  friend A::A () {}             // { dg-error "cannot define member" }
35
  friend A::~A () {}            // { dg-error "cannot define member" }
36
  friend A::A (const A &) {}    // { dg-error "cannot define member" }
37
};

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.