/cp
2013-11-16 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/29143
* semantics.c (finish_call_expr): Ensure that for OVERLOADs too
'(&f)(...)' is the same as '(f)(...)', per 13.3.1.1.
/testsuite
2013-11-16 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/29143
* g++.dg/overload/addr2.C: New.
* g++.old-deja/g++.other/overload11.C: Adjust.
From-SVN: r204899
+2013-11-16 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/29143
+ * semantics.c (finish_call_expr): Ensure that for OVERLOADs too
+ '(&f)(...)' is the same as '(f)(...)', per 13.3.1.1.
+
2013-11-15 Aldy Hernandez <aldyh@redhat.com>
* Make-lang.in (CXX_AND_OBJCXX_OBJS): Depend on cp/cp-cilkplus.o.
}
}
+ /* Per 13.3.1.1, '(&f)(...)' is the same as '(f)(...)'. */
+ if (TREE_CODE (fn) == ADDR_EXPR
+ && TREE_CODE (TREE_OPERAND (fn, 0)) == OVERLOAD)
+ fn = TREE_OPERAND (fn, 0);
+
if (is_overloaded_fn (fn))
fn = baselink_for_fns (fn);