On Thu, Apr 19, 2018 at 02:29:37PM +0100, Jonathan Wakely wrote: > The fix for PR c++/69733 caused a regression for conversion operators > with redundant cv-qualifiers, changing an incorrect location to an > unknown location. This restores it to the incorrect location (as was > already done on trunk by the fix for PR c++/65775). > > Tested x86_64-linux, OK for gcc-7-branch?
LGTM, though please commit the testcase also to trunk. > commit fc16f7b06d38c34be068b9ae3a4fd8d6095070e5 > Author: Jonathan Wakely <jwak...@redhat.com> > Date: Thu Apr 19 12:01:53 2018 +0100 > > PR c++/85464 - missing location for -Wignored-qualifiers diagnostic > > The fix for PR c++/69733 caused a regression for conversion operators > with redundant cv-qualifiers, changing an incorrect location to an > unknown location. This restores it to the incorrect location (as was > already done on trunk by the fix for PR c++/65775). > > gcc/cp: > > PR c++/85464 - missing location for -Wignored-qualifiers > diagnostic > * decl.c (grokdeclarator): If declspecs->locations[ds_type_spec] > is UNKNOWN_LOCATION fall back to input_location. > > gcc/testsuite: > > PR c++/85464 - missing location for -Wignored-qualifiers > diagnostic > * g++.dg/diagnostic/pr85464.C: New. Jakub