rtti.c (build_dynamic_cast_1): Give a better error message for an attempt to dynamic_cast a polymorphic type.

* rtti.c (build_dynamic_cast_1): Give a better error message for
	an attempt to dynamic_cast a polymorphic type.

From-SVN: r30248
This commit is contained in:
Ian Lance Taylor 1999-10-28 23:55:28 +00:00 committed by Ian Lance Taylor
parent a609297536
commit 0f4d5c1c4d
2 changed files with 8 additions and 0 deletions

View File

@ -1,3 +1,8 @@
1999-10-28 Ian Lance Taylor <ian@zembu.com>
* 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 <mark@codesourcery.com>
* cp-tree.h (make_temp_vec): Remove.

View File

@ -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);