diff options
author | Jason Merrill <jason@gcc.gnu.org> | 1998-10-05 18:10:23 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 1998-10-05 18:10:23 -0400 |
commit | c27be9b9fcdefd81b8259a894de4e345692d8cce (patch) | |
tree | 69bdf981d82476dc6068212b923d5fe55ae43124 /gcc/cp/call.c | |
parent | cac8ce95a1e4c7b10f5847d35b3650e6fba8d38c (diff) | |
download | gcc-c27be9b9fcdefd81b8259a894de4e345692d8cce.zip gcc-c27be9b9fcdefd81b8259a894de4e345692d8cce.tar.gz gcc-c27be9b9fcdefd81b8259a894de4e345692d8cce.tar.bz2 |
pt.c (instantiate_decl): Do save and restore file position.
* pt.c (instantiate_decl): Do save and restore file position.
* method.c (build_decl_overload_real): Clear
numeric_output_need_bar after __.
* call.c (build_new_method_call): Issue 'incomplete type' error,
if class is not defined.
From-SVN: r22856
Diffstat (limited to 'gcc/cp/call.c')
-rw-r--r-- | gcc/cp/call.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/cp/call.c b/gcc/cp/call.c index 31c198a..07ed1ae 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -3689,8 +3689,12 @@ build_new_method_call (instance, name, args, basetype_path, flags) /* XXX will LOOKUP_SPECULATIVELY be needed when this is done? */ if (flags & LOOKUP_SPECULATIVELY) return NULL_TREE; - cp_error ("no matching function for call to `%T::%D (%A)%V'", basetype, - pretty_name, user_args, TREE_TYPE (TREE_TYPE (instance_ptr))); + if (TYPE_SIZE (basetype) == 0) + incomplete_type_error (instance_ptr, basetype); + else + cp_error ("no matching function for call to `%T::%D (%A)%V'", + basetype, pretty_name, user_args, + TREE_TYPE (TREE_TYPE (instance_ptr))); print_z_candidates (candidates); return error_mark_node; } |