]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
rtti.c (build_dynamic_cast_1): Give a better error message for an attempt to dynamic_...
authorIan Lance Taylor <ian@zembu.com>
Thu, 28 Oct 1999 23:55:28 +0000 (23:55 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Thu, 28 Oct 1999 23:55:28 +0000 (23:55 +0000)
* rtti.c (build_dynamic_cast_1): Give a better error message for
an attempt to dynamic_cast a polymorphic type.

From-SVN: r30248

gcc/cp/ChangeLog
gcc/cp/rtti.c

index 6fb431945ee775a4873d397821e126dc357fc38c..2b01e90c4fbdcf5fee502431216987e871e118b2 100644 (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.
index 2580eaa63a6b36dd45211e2e15b6704f85c2f19f..78c1059e6a3633fdd309ee3dbebedfea78fe9d63 100644 (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);