On 06/04/2012 10:15 AM, Paolo Carlini wrote:
@@ -5413,7 +5413,7 @@ build_op_delete_call (enum tree_code code, tree ad
      fns = lookup_name_nonclass (fnname);

    /* Strip const and volatile from addr.  */
-  addr = cp_convert (ptr_type_node, addr);
+  addr = cp_convert (ptr_type_node, addr, tf_warning_or_error);

build_op_delete_call is called from build_new_1, so it should be complainified.

+             if (complain & tf_error)
+               {
+                 if (flags & LOOKUP_COMPLAIN)
+                   permerror (loc, "conversion from %q#T to %q#T",
+                              intype, type);
+                 if (!flag_permissive)
+                   return error_mark_node;
+               }
+             else
                return error_mark_node;

I don't think we want to check both tf_error and LOOKUP_COMPLAIN everywhere. We could use one to set the other, but at this point I think we want to do away with LOOKUP_COMPLAIN entirely as its function has been taken over.

Jason

Reply via email to