On 06/05/2012 08:23 PM, Paolo Carlini wrote:
@@ -1695,6 +1695,8 @@ implicit_conversion (tree to, tree from, tree expr
|LOOKUP_NO_TEMP_BIND|LOOKUP_NO_RVAL_BIND|LOOKUP_PREFER_RVALUE
|LOOKUP_NO_NARROWING|LOOKUP_PROTECT);
+ complain&= ~tf_error;
I don't think we want warnings from implicit_conversion, either.
- if (flags & LOOKUP_COMPLAIN)
- permerror (loc, "conversion from %q#T to %q#T", intype, type);
- if (!flag_permissive)
+ if (complain & tf_error)
+ {
+ permerror (loc, "conversion from %q#T to %q#T",
+ intype, type);
+ if (!flag_permissive)
+ return error_mark_node;
I don't think we need the last two lines anymore, we can use the usual
pattern of return error if sfinae, permerror and continue otherwise.
BTW, I'm somewhat surprised that dropping LOOKUP_COMPLAIN from all the
lookup_* functions works fine, but looking through the code myself I
don't see anything that was using the flag.
Jason