<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Jul 26, 2011, at 11:03 PM, John McCall wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On Jul 26, 2011, at 9:54 PM, Douglas Gregor wrote:</div><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On Jul 26, 2011, at 3:34 PM, Eli Friedman wrote:</div><blockquote type="cite"><div>On Tue, Jul 26, 2011 at 3:28 PM, Sean Hunt <<a href="mailto:scshunt@csclub.uwaterloo.ca">scshunt@csclub.uwaterloo.ca</a>> wrote:<br><blockquote type="cite">On Tue, Jul 26, 2011 at 15:25, Eli Friedman <<a href="mailto:eli.friedman@gmail.com">eli.friedman@gmail.com</a>> wrote:<br></blockquote><blockquote type="cite"><blockquote type="cite">Author: efriedma<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Date: Tue Jul 26 17:25:31 2011<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">New Revision: 136161<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">URL: <a href="http://llvm.org/viewvc/llvm-project?rev=136161&view=rev">http://llvm.org/viewvc/llvm-project?rev=136161&view=rev</a><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Log:<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">A couple minor issues with Sema for delete:<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">1. Attempting to delete an expression of incomplete class type should be an error, not a warning.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">2. If someone tries to delete a pointer to an incomplete class type, make sure we actually emit<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">the delete expression after we warn.<br></blockquote></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Deleting an object of incomplete class type is well-formed;<br></blockquote><blockquote type="cite">[expr.delete]/5. This should not be an error.<br></blockquote><br> [expr.delete]/1: "The operand shall have a pointer to object type, or<br>a class type having a single non-explicit conversion function (12.3.2)<br>to a pointer to object type."  An expression of incomplete class type<br>isn't either of those.<br></div></blockquote></div><div><br></div>An incomplete class type is an object type in C++.</div></blockquote><div><br></div>But it's not a pointer to object type.  The "object being deleted" per [expr.delete]p1</div></div></blockquote><div><br></div></div><div>Er, that is, per [expr.delete]p5.  And p2, for that matter.</div><div><br></div><div>I think we're supposed to interpret "the operand" in p6 and p7 as already having undergone conversion, which gives "the operand" meaning the pointer and "the object" meaning the object to which the operand points if it's non-null.</div><div><br></div><div>This could be much more precisely drafted, but if one reads it with one's eyes always fixed on intent, it seems obvious enough.</div><div><br></div><div>John.</div></body></html>