This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] PR c++/80544 strip cv-quals from cast results
- From: Jason Merrill <jason at redhat dot com>
- To: Jonathan Wakely <jwakely at redhat dot com>
- Cc: gcc-patches List <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 19 May 2017 15:14:18 -0400
- Subject: Re: [PATCH] PR c++/80544 strip cv-quals from cast results
- Authentication-results: sourceware.org; auth=none
- References: <20170427165907.GL5109@redhat.com>
On Thu, Apr 27, 2017 at 12:59 PM, Jonathan Wakely <jwakely@redhat.com> wrote:
> I also tried to add a warning like EDG's (see the PR) but it gave a
> false positive for direct-list-init of scoped enums (P0138R2, r240449)
> because that code goes through build_c_cast to perform the conversion,
> so looks like a cast to my new warning.
The enum init code could strip the cv-quals when calling build_c_cast
to avoid the warning.
Jason