* call.c (convert_like_real): Mask complain.
* semantics.c (perform_koenig_lookup): Likewise.
From-SVN: r238397
2016-07-15 Jason Merrill <jason@redhat.com>
+ PR c++/71495
+ * call.c (convert_like_real): Mask complain.
+ * semantics.c (perform_koenig_lookup): Likewise.
+
PR c++/71092
* constexpr.c (cxx_eval_call_expression): Fail quietly when cgraph
threw away DECL_SAVED_TREE.
expr = decay_conversion (expr, complain);
if (expr == error_mark_node)
{
- if (complain)
+ if (complain & tf_error)
{
maybe_print_user_conv_context (convs);
if (fn)
if (!fn)
{
/* The unqualified name could not be resolved. */
- if (complain)
+ if (complain & tf_error)
fn = unqualified_fn_lookup_error (cp_expr (identifier, loc));
else
fn = identifier;
--- /dev/null
+// PR c++/71495
+// { dg-do compile { target c++11 } }
+
+struct A;
+template <class T> void f(T); // { dg-bogus "initializing" }
+template <class T> T&& declval();
+struct B
+{
+ template <class T, class U> static decltype(f<T>(declval<U>())) g(int);
+ template <class T, class U> void g(...);
+} b;
+
+int main()
+{
+ b.g<A,A>(42);
+}