This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of TC1 status.
Section: 21.6.2 [new.delete] Status: TC1 Submitter: Steve Clamage Opened: 1998-01-04 Last modified: 2017-02-03
Priority: Not Prioritized
View all other issues in [new.delete].
View all issues with TC1 status.
Scott Meyers, in a comp.std.c++ posting: I just noticed that section 22.214.171.124 of CD2 seems to allow for the possibility that all calls to operator new(0) yield the same pointer, an implementation technique specifically prohibited by ARM 5.3.3.Was this prohibition really lifted? Does the FDIS agree with CD2 in the regard? [Issues list maintainer's note: the IS is the same.]
Change the last paragraph of 3.7.3 from:
Any allocation and/or deallocation functions defined in a C++ program shall conform to the semantics specified in 126.96.36.199 and 188.8.131.52.
Any allocation and/or deallocation functions defined in a C++ program, including the default versions in the library, shall conform to the semantics specified in 184.108.40.206 and 220.127.116.11.
Change 18.104.22.168/2, next-to-last sentence, from :
If the size of the space requested is zero, the value returned shall not be a null pointer value (4.10).
Even if the size of the space requested is zero, the request can fail. If the request succeeds, the value returned shall be a non-null pointer value (4.10) p0 different from any previously returned value p1, unless that value p1 was since passed to an operator delete.
5.3.4/7 currently reads:
When the value of the expression in a direct-new-declarator is zero, the allocation function is called to allocate an array with no elements. The pointer returned by the new-expression is non-null. [Note: If the library allocation function is called, the pointer returned is distinct from the pointer to any other object.]
Retain the first sentence, and delete the remainder.
18.5.1 currently has no text. Add the following:
Except where otherwise specified, the provisions of 3.7.3 apply to the library versions of operator new and operator delete.
To 22.214.171.124, add the following text:
The provisions of 3.7.3 do not apply to these reserved placement forms of operator new and operator delete.
See 99-0040/N1216, October 22, 1999, by Stephen D. Clamage for the analysis supporting to the proposed resolution.