diff options
author | Ian Lance Taylor <ian@zembu.com> | 1999-10-28 23:55:28 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 1999-10-28 23:55:28 +0000 |
commit | 0f4d5c1c4d6c91c3cad04c484c5dac2324e94a82 (patch) | |
tree | 26b4c65bbe4d98c41cb050c861220c69ab29259b /gcc | |
parent | a6092975367388a74307ea5c40eb539ad83a1fb1 (diff) | |
download | gcc-0f4d5c1c4d6c91c3cad04c484c5dac2324e94a82.zip gcc-0f4d5c1c4d6c91c3cad04c484c5dac2324e94a82.tar.gz gcc-0f4d5c1c4d6c91c3cad04c484c5dac2324e94a82.tar.bz2 |
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/rtti.c | 3 |
2 files changed, 8 insertions, 0 deletions
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 <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. 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); |