+2009-07-14 Jason Merrill <jason@redhat.com>
+
+ PR c++/40740
+ * semantics.c (perform_koenig_lookup): Handle empty template args.
+
2009-07-13 Jason Merrill <jason@redhat.com>
* call.c (build_over_call): Use can_trust_pointer_alignment.
tree identifier = NULL_TREE;
tree functions = NULL_TREE;
tree tmpl_args = NULL_TREE;
+ bool template_id = false;
if (TREE_CODE (fn) == TEMPLATE_ID_EXPR)
{
+ /* Use a separate flag to handle null args. */
+ template_id = true;
tmpl_args = TREE_OPERAND (fn, 1);
fn = TREE_OPERAND (fn, 0);
}
fn = unqualified_fn_lookup_error (identifier);
}
- if (fn && tmpl_args)
- fn = build_nt (TEMPLATE_ID_EXPR, fn, tmpl_args);
+ if (fn && template_id)
+ fn = build2 (TEMPLATE_ID_EXPR, unknown_type_node, fn, tmpl_args);
return fn;
}
+2009-07-14 Jason Merrill <jason@redhat.com>
+
+ PR c++/40740
+ * g++.dg/template/koenig8.C: New.
+
2009-07-14 Jack Howarth <howarth@bromo.med.uc.edu>
* testsuite/gcc.c-torture/compile/20000804-1.c: skip for ilp32 on