PR c++/48883
PR c++/49609
* pt.c (resolve_nondeduced_context): Call mark_used.
From-SVN: r175764
2011-07-01 Jason Merrill <jason@redhat.com>
+ PR c++/48883
+ PR c++/49609
+ * pt.c (resolve_nondeduced_context): Call mark_used.
+
PR c++/49085
* semantics.c (finish_offsetof): Complain about incomplete type.
}
if (good == 1)
{
+ mark_used (goodfn);
expr = goodfn;
if (baselink)
expr = build_baselink (BASELINK_BINFO (baselink),
2011-07-01 Jason Merrill <jason@redhat.com>
+ PR c++/48883
+ * g++.dg/template/explicit-args4.C: New.
+
PR c++/49085
* g++.dg/template/offsetof2.C: New.
--- /dev/null
+// PR c++/48883
+// { dg-do link }
+
+template<typename T>
+T myMax(T a, T b) {
+ if(a < b) return a;
+ return b;
+}
+
+int main() {
+ bool even = true;
+ int (*fp)(int, int);
+ fp = even ? myMax<int> : myMax<int>; /* yields link error */
+}