diff options
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/typeck.c | 7 |
2 files changed, 12 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index b6fe158..1661e41 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +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. diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c index 5c45976..25d6ac4 100644 --- a/gcc/cp/typeck.c +++ b/gcc/cp/typeck.c @@ -1888,8 +1888,13 @@ finish_class_member_access_expr (tree object, tree name) /* 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 { |