cvt.c (convert_lvalue): New fn.
* cvt.c (convert_lvalue): New fn. * cp-tree.h: Declare it. * method.c (do_build_assign_ref): Use it. (do_build_copy_constructor): Convert parm to base types before calling base constructors. From-SVN: r43798
This commit is contained in:
parent
1e4ce346c5
commit
ede3cf236b
@ -6,6 +6,8 @@ extern "C" void exit(int);
|
||||
class A;
|
||||
class B;
|
||||
|
||||
int c;
|
||||
|
||||
class A {
|
||||
public:
|
||||
|
||||
@ -30,6 +32,7 @@ public:
|
||||
virtual ~B(void){}
|
||||
|
||||
void print(void) const {
|
||||
++c;
|
||||
printf("B::print\n");
|
||||
}
|
||||
|
||||
@ -50,6 +53,14 @@ int main ()
|
||||
{
|
||||
A titi;
|
||||
A toto = titi.compute();
|
||||
printf("PASS\n");
|
||||
return 0;
|
||||
if (c != 1)
|
||||
{
|
||||
printf ("FAIL\n");
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("PASS\n");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user