+2008-11-20 Jason Merrill <jason@redhat.com>
+
+ PR c++/37540
+ * call.c (build_over_call): Take the address of the function even
+ in a template.
+ (build_new_method_call): Remember the type of the called function
+ in a template.
+
2008-11-19 Dodji Seketeli <dodji@redhat.com>
PR c++/37142
PR c++/35405
* pt.c (lookup_template_class): Check pointers before dereferencing
- Them.
+ them.
* error.c (dump_template_decl): Likewise.
2008-11-19 Jason Merrill <jason@redhat.com>
tree expr;
tree return_type;
return_type = TREE_TYPE (TREE_TYPE (fn));
- expr = build_call_list (return_type, fn, args);
+ expr = build_call_list (return_type, build_addr_func (fn), args);
if (TREE_THIS_VOLATILE (fn) && cfun)
current_function_returns_abnormally = 1;
if (!VOID_TYPE_P (return_type))
}
if (processing_template_decl && call != error_mark_node)
- call = (build_min_non_dep_call_list
- (call,
- build_min_nt (COMPONENT_REF, orig_instance, orig_fns, NULL_TREE),
- orig_args));
+ {
+ if (TREE_CODE (call) == INDIRECT_REF)
+ call = TREE_OPERAND (call, 0);
+ call = (build_min_non_dep_call_list
+ (call,
+ build_min (COMPONENT_REF, TREE_TYPE (CALL_EXPR_FN (call)),
+ orig_instance, orig_fns, NULL_TREE),
+ orig_args));
+ call = convert_from_reference (call);
+ }
/* Free all the conversions we allocated. */
obstack_free (&conversion_obstack, p);