https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65775
--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> --- Author: redi Date: Thu Apr 19 15:29:03 2018 New Revision: 259499 URL: https://gcc.gnu.org/viewcvs?rev=259499&root=gcc&view=rev Log: 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. Added: branches/gcc-7-branch/gcc/testsuite/g++.dg/diagnostic/pr85464.C Modified: branches/gcc-7-branch/gcc/cp/ChangeLog branches/gcc-7-branch/gcc/cp/decl.c branches/gcc-7-branch/gcc/testsuite/ChangeLog