On Tue, May 23, 2017 at 2:00 PM, Jonathan Wakely <jwak...@redhat.com> wrote: > On 19/05/17 15:14 -0400, Jason Merrill wrote: >> >> On Thu, Apr 27, 2017 at 12:59 PM, Jonathan Wakely <jwak...@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. > > > Thanks, that works. I don't think this warning fits under any existing > option, so I'll add a new one. -Wuseless-cast-qual maybe? Or is that > too close to -Wuseless-cast and -Wcast-qual and would cause confusion?
-Wcast-rvalue-qual ? Jason