* 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
-Tue Oct 6 00:07:14 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+1998-10-05 Jason Merrill <jason@yorick.cygnus.com>
+
+ * pt.c (instantiate_decl): Do save and restore file position.
+
+1998-10-05 Martin von Löwis <loewis@informatik.hu-berlin.de>
+
+ * method.c (build_decl_overload_real): Clear
+ numeric_output_need_bar after __.
+
+1998-10-05 Nathan Sidwell <nathan@acm.org>
+
+ * call.c (build_new_method_call): Issue 'incomplete type' error,
+ if class is not defined.
+
+1998-10-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* call.c (build_object_call): Move declaration of variable
`fn' into the scope where it is used. Don't access variable
/* 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;
}
and figure out its name without any extra encoding. */
OB_PUTC2 ('_', '_');
+ numeric_output_need_bar = 0;
if (tparms)
{
tree gen_tmpl;
int nested = in_function_p ();
int pattern_defined;
+ int line = lineno;
+ char *file = input_filename;
/* This function should only be used to instantiate templates for
functions and static member variables. */
&& ! at_eof))
{
/* Defer all templates except inline functions used in another
- function. */
+ function. We restore the source position here because it's used
+ by add_pending_template. */
+ lineno = line;
+ input_filename = file;
+
if (at_eof && !pattern_defined
&& DECL_EXPLICIT_INSTANTIATION (d))
/* [temp.explicit]
}
out:
+ lineno = line;
+ input_filename = file;
+
pop_from_top_level ();
pop_tinst_level ();