URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [tags/] [gnu-dev/] [fsf-gcc-snapshot-1-mar-12/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [parse/] [pr34758.C] - Rev 847
Go to most recent revision | Compare with Previous | Blame | View Log
// PR 34758 Bad diagnostic for circular dependency in constructor default argument
// { dg-do compile }
// { dg-options "" }
struct A
{
A (const A& = A()); // { dg-error "recursive evaluation of default argument" }
};
struct S {
S(const S& = f()); // { dg-error "default argument\[^\n\]*which is not yet defined" }
static const S& f(int i = 3);
};
struct J {
J(const J& = f(2)); // { dg-error "default argument.*which is not yet defined" }
static const J& f(int i = 3, int j = 4);
};
struct Z {
Z(const Z& = f(4));
static const Z& f(int i = 3);
};
struct X {
X(const X& = g());
static const X& g(void);
};
Go to most recent revision | Compare with Previous | Blame | View Log