From: ian Date: Thu, 28 Oct 1999 23:55:28 +0000 (+0000) Subject: * rtti.c (build_dynamic_cast_1): Give a better error message for X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3d12154686e608b4fa365d86a8a48a3123d1eb82;p=platform%2Fupstream%2Flinaro-gcc.git * rtti.c (build_dynamic_cast_1): Give a better error message for an attempt to dynamic_cast a polymorphic type. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30248 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 6fb4319..2b01e90 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +1999-10-28 Ian Lance Taylor + + * rtti.c (build_dynamic_cast_1): Give a better error message for + an attempt to dynamic_cast a polymorphic type. + 1999-10-27 Mark Mitchell * cp-tree.h (make_temp_vec): Remove. diff --git a/gcc/cp/rtti.c b/gcc/cp/rtti.c index 2580eaa..78c1059 100644 --- a/gcc/cp/rtti.c +++ b/gcc/cp/rtti.c @@ -692,6 +692,9 @@ build_dynamic_cast_1 (type, expr) } } + cp_error ("dynamic_cast from non-polymorphic type `%#T'", exprtype); + return error_mark_node; + fail: cp_error ("cannot dynamic_cast `%E' (of type `%#T') to type `%#T'", expr, exprtype, type);