This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++ PATCH] [PR13086] Clarification of diagnostic on delete of an incomplete type (regression on 3.3/trunk)
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: "Giovanni Bajo" <giovannibajo at libero dot it>
- Cc: <gcc-patches at gcc dot gnu dot org>
- Date: 15 Jan 2004 16:29:05 +0100
- Subject: Re: [C++ PATCH] [PR13086] Clarification of diagnostic on delete of an incomplete type (regression on 3.3/trunk)
- Organization: Integrable Solutions
- References: <101701c3db64$38157a10$34b82997@bagio>
"Giovanni Bajo" <giovannibajo@libero.it> writes:
| incomplete1.C:19: warning: possible problem detected in invocation of delete
| operator:
| incomplete1.C:14: warning: `a' has incomplete type
| incomplete1.C:12: warning: forward declaration of `struct A'
| incomplete1.C:19: note: the generated code will not work, unless the class does
| not have a destructor nor a delete operator.
I like your use of inform() -- it is for one of those things I introduced
it for.
I have a preference for
inform ("the generated code may not work")
i.e. scratch althogeter mention to "destructor" and "delete operator".
Also scratch the "possible problem detected..." bits.
I suggest you change
incomplete1.C:14: warning: `a' has incomplete type
to
incomplete1.C:14: warning: pointer 'a' points to an object of
incomplete type
The object/pointer 'a' has a *complete* type -- a pointer to data
always has a complete type.
I'm not sure about the "foward declaration" wording though. You may
leave it as is for the moment. With those changes, the patch is OK.
-- Gaby