On Tue, Jul 26, 2011 at 11:03 PM, John McCall <[email protected]> wrote:

> But it's not a pointer to object type.


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.

Specifically, to avoid further confusion, the test cases:

+namespace DeleteIncompleteClass {
+  struct A; // expected-note {{forward declaration}}
+  extern A x;
+  void f() { delete x; } // expected-error {{deleting incomplete class
type}}
+}
Non-pointer, hard error.

+namespace DeleteIncompleteClassPointerError {
+  struct A; // expected-note {{forward declaration}}
+  void f(A *x) { 1+delete x; } // expected-warning {{deleting pointer to
incomplete type}} \
+                               // expected-error {{invalid operands to
binary expression}}
+}
Pointer, and just a warning.
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to