PR c++/12486
* typeck.c (finish_class_member_access_expr): Issue diagnostic
on erroneous use of qualified name.
PR c++/12486
* g++.dg/inherit/error1.C: New test.
From-SVN: r72052
+2003-10-02 Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/12486
+ * typeck.c (finish_class_member_access_expr): Issue diagnostic
+ on erroneous use of qualified name.
+
2003-09-30 Richard Henderson <rth@redhat.com>
* decl.c (duplicate_decls): Copy DECL_SAVED_INSNS too.
/* Find the base of OBJECT_TYPE corresponding to SCOPE. */
access_path = lookup_base (object_type, scope, ba_check, NULL);
- if (!access_path || access_path == error_mark_node)
+ if (access_path == error_mark_node)
return error_mark_node;
+ if (!access_path)
+ {
+ error ("`%T' is not a base of `%T'", scope, object_type);
+ return error_mark_node;
+ }
}
else
{
+2003-10-02 Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/12486
+ * g++.dg/inherit/error1.C: New test.
+
2003-10-02 Chris Demetriou <cgd@broadcom.com>
* lib/f-torture.exp (search_for): Rename to...
--- /dev/null
+// PR 12486
+
+struct A { int ma; };
+struct B { };
+
+void foo()
+{
+ B *b;
+ b->A::ma=0; // { dg-error "" }
+}