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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [parse/] [pr34758.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 34758 Bad diagnostic for circular dependency in constructor default argument
2
// { dg-do compile }
3
// { dg-options "" }
4
struct A
5
{
6
  A (const A& = A()); // { dg-error "recursive evaluation of default argument" }
7
};
8
 
9
 
10
struct S {
11
  S(const S& = f()); // { dg-error "default argument\[^\n\]*which is not yet defined" }
12
  static const S& f(int i = 3);
13
};
14
 
15
struct J {
16
  J(const J& = f(2)); // { dg-error "default argument.*which is not yet defined" }
17
  static const J& f(int i = 3, int j = 4);
18
};
19
 
20
struct Z {
21
  Z(const Z& = f(4));
22
  static const Z& f(int i = 3);
23
};
24
 
25
struct X {
26
  X(const X& = g());
27
  static const X& g(void);
28
};

powered by: WebSVN 2.1.0

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