PR C++/8031
* cvt.c (convert_to_pointer_force): Don't try comparing against
erronous type.
From-SVN: r60105
+2002-12-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
+
+ PR C++/8031
+ * cvt.c (convert_to_pointer_force): Don't try comparing against
+ erronous type.
+
2002-12-10 Mark Mitchell <mark@codesourcery.com>
PR c++/8372
if (binfo)
{
expr = build_base_path (code, expr, binfo, 0);
+ if (expr == error_mark_node)
+ return error_mark_node;
/* Add any qualifier conversions. */
if (!same_type_p (TREE_TYPE (TREE_TYPE (expr)),
TREE_TYPE (type)))
--- /dev/null
+// Copyright (C) 2002 Free Software Foundation
+// Contributed by Gabriel Dos Reis <gdr@integrable-solutions.net>
+
+struct A {
+ virtual void f(const A* a) = 0;
+};
+
+struct B : virtual A {
+ virtual void f(const A* a);
+};
+
+void B::f(const A* a)
+{
+ static_cast<const B&>(*a); // { dg-error "" }
+}