This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/29185] inconsistent warning: deleting array
- From: "sebor at roguewave dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 Sep 2006 16:57:45 -0000
- Subject: [Bug c++/29185] inconsistent warning: deleting array
- References: <bug-29185-1186@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from sebor at roguewave dot com 2006-09-22 16:57 -------
Yes, but 5.3.5, p1 says "The operand shall have a pointer type, or a class
type having a single conversion function (12.3.2) to a pointer type." and
not "shall be convertible to a pointer type." Note that gcc issues a hard
error for a dynamic_cast expression whose argument is an array, so I would
expect it to treat the delete expression the same since they both have the
same requirement WRT pointers.
Btw., I sent an email to EDG to request that they at least warn and to find
out whether they think it's well-formed. I'll update the incident with their
response. Also note that both IBM XLC++ and HP aCC issue an error for the
test case.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29185