This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/85858] -Weffc++ should not require copy ctor for const pointers
- From: "msharov at users dot sourceforge.net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 21 May 2018 21:01:12 +0000
- Subject: [Bug c++/85858] -Weffc++ should not require copy ctor for const pointers
- Auto-submitted: auto-generated
- References: <bug-85858-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85858
--- Comment #6 from Mike Sharov <msharov at users dot sourceforge.net> ---
(In reply to Jonathan Wakely from comment #5)
> Nope, see the C++ standard:
>
> [ Note: A pointer to a const type can be the operand of a
> delete-expression;
Ok, I guess; you have to follow the standard, after all. But I would like to
see the rationale for this, because it sure looks like a violation of const
correctness. I certainly feel violated.