<div class="gmail_quote">On Tue, Jul 26, 2011 at 11:03 PM, John McCall <span dir="ltr"><<a href="mailto:rjmccall@apple.com">rjmccall@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
But it's not a pointer to object type.</blockquote></div><br><div>Yea, I think everyone got confused on this point. The test case clearly demonstrates what it is this patch makes into an error and I agree it should be an error.</div>
<div><br></div><div>Specifically, to avoid further confusion, the test cases:</div><div><br></div><div><span class="Apple-style-span" style="color: rgb(51, 51, 51); font-family: monospace; background-color: rgb(255, 255, 255); ">+namespace DeleteIncompleteClass {<br>
+  struct A; // expected-note {{forward declaration}}<br>+  extern A x;<br>+  void f() { delete x; } // expected-error {{deleting incomplete class type}}<br>+}</span></div>Non-pointer, hard error.<div><br><div><span class="Apple-style-span" style="color: rgb(51, 51, 51); font-family: monospace; background-color: rgb(255, 255, 255); ">+namespace DeleteIncompleteClassPointerError {<br>
+  struct A; // expected-note {{forward declaration}}<br>+  void f(A *x) { 1+delete x; } // expected-warning {{deleting pointer to incomplete type}} \<br>+                               // expected-error {{invalid operands to binary expression}}<br>
+}</span></div>Pointer, and just a warning.</div>