Read and respond to this message at:
I am using mingw 3.4.2 (lastest as of writing) and I came across a rather interesting
The following code
p = new char;
produces this warning:
13 C:\Dev-C++\Projects\test.cpp [Warning] deleting `void*' is undefined
That does not make sense. See below for a part of the draft Standard:
5.3.5 Delete [expr.delete]
1 The delete-expression operator destroys a most derived object
(_intro.object_) or array created by a new-expression.
::opt delete cast-expression
::opt delete [ ] cast-expression
The first alternative is for non-array objects, and the second is for
arrays. The operand shall have a pointer type, or a class type having
a single conversion function (_class.conv.fct_) to a pointer type.
The result has type void.
Note that last sentence? The result has type *void*. That's exactly how delete
works. It expectes a void pointer!
So in any way, this warning is a *stupid* one and should be removed.
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit: