This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
eb99
- To: egcs-patches at cygnus dot com
- Subject: eb99
- From: Martin von Loewis <martin at mira dot isdn dot cs dot tu-berlin dot de>
- Date: Mon, 1 Jun 1998 12:43:07 +0200
There is no conversion from Baz* to Bar*.
Martin
Index: eb99.C
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/testsuite/g++.old-deja/g++.robertl/eb99.C,v
retrieving revision 1.1
diff -c -p -r1.1 eb99.C
*** eb99.C 1998/05/27 23:00:36 1.1
--- eb99.C 1998/06/01 10:23:42
*************** class Baz : public ref_counted {
*** 128,134 ****
class Bar;
! void main() {
ref_ptr<Baz> foo;
! static_cast<Bar *> (foo)->DoSomething;
}
--- 128,134 ----
class Bar;
! int main() {
ref_ptr<Baz> foo;
! static_cast<Bar *> (foo)->DoSomething; //ERROR - invalid cast
}