]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/testsuite/g++.old-deja/g++.jason/default2.C
extern2.cc (foo): Declare as of type cost char*.
[thirdparty/gcc.git] / gcc / testsuite / g++.old-deja / g++.jason / default2.C
CommitLineData
6481daa9 1// { dg-do assemble }
921e5a0e 2// PRMS Id: 5921
921e5a0e
JL
3// Bug: default arguments containing constructor calls persist incorrectly.
4
5class foo
6{
7 public:
8 foo();
9 foo(int x);
10 public:
11 int iamamember;
12};
13
14class bar
15{
16 public:
17 bar();
7235a4d4 18 int memberfunction(int i, const char *j, double k, foo foo1 = foo(0));
921e5a0e
JL
19};
20
21int
22pain(bar *bar1)
23{
24 return bar1->memberfunction(1, "x", 0.0);
25}
26
27int
28pain2(bar *bar1)
29{
30 return bar1->memberfunction(1, "x", 0.0);
31}