Richard Smith <> changed:

           What    |Removed                     |Added
         Resolution|---                         |INVALID
             Status|NEW                         |RESOLVED
                 CC|                            |

--- Comment #1 from Richard Smith <> ---
C++ []p10 ( explicitly permits this

"An implementation is allowed to omit a call to a replaceable global allocation
function ([new.delete.single], [new.delete.array]). When it does so, the
storage is instead provided by the implementation"

If you want to observe side-effects of your '::operator new(size_t)'
implementation (eg, when writing tests for your allocator), you need to make a
regular function call, rather than using a new-expression. LLVM will not delete
the 'operator new' call here:

    S *s = new (::operator new(sizeof(S))) S;

You are receiving this mail because:
You are on the CC list for the bug.
llvm-bugs mailing list

Reply via email to