Created on 2003-12-02.00:00:00 last changed 161 months ago
[Voted into WP at October 2005 meeting.]
Proposed resolution (April, 2005):
This issue is resolved by the resolution of issue 348.
Notes from October 2004 meeting:
This wording is superseded by, and this issue will be resolved by, the resolution of issue 348.
After some discussion in comp.lang.c++.moderated we came to the conclusion that there seems to be a defect in 188.8.131.52 [expr.delete]/4, which says:
The cast-expression in a delete-expression shall be evaluated exactly once. If the delete-expression calls the implementation deallocation function (184.108.40.206), and if the operand of the delete expression is not the null pointer constant, the deallocation function will deallocate the storage referenced by the pointer thus rendering the pointer invalid. [Note: the value of a pointer that refers to deallocated storage is indeterminate. ]
In the second sentence, the term "null pointer constant" should be changed to "null pointer". In its present form, the passage claims that the deallocation function will deallocate the storage refered to by a null pointer that did not come from a null pointer constant in the delete expression. Besides, how can the null pointer constant be the operand of a delete expression, as "delete 0" is an error because delete requires a pointer type or a class type having a single conversion function to a pointer type?
See also issue 348.
Change the indicated sentence of 220.127.116.11 [expr.delete] paragraph 4 as follows:
If the delete-expression calls the implementation deallocation function (18.104.22.168.3 [basic.stc.dynamic.deallocation]), and if the operand of the delete expression is not
thenull pointer constant, the deallocation function will deallocate the storage referenced by the pointer thus rendering the pointer invalid.
|2008-10-05 00:00:00||admin||set||status: wp -> cd1|
|2006-04-22 00:00:00||admin||set||status: dr -> wp|
|2005-10-22 00:00:00||admin||set||messages: + msg1275|
|2005-10-22 00:00:00||admin||set||status: ready -> dr|
|2005-05-01 00:00:00||admin||set||messages: + msg1136|
|2005-05-01 00:00:00||admin||set||status: review -> ready|
|2004-11-07 00:00:00||admin||set||messages: + msg1055|
|2004-04-09 00:00:00||admin||set||status: open -> review|