https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85858

--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Nope, see the C++ standard:

  [ Note: A pointer to a const type can be the operand of a delete-expression;
  it is not necessary to cast away the constness (8.5.1.11) of the pointer
  expression before it is used as the operand of the delete-expression. — end
  note ]

The deallocation function 'operator delete(void*)' is not the same as a
delete-expression such as delete[] p.

Reply via email to