This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/85464] [7 Regression] Wignored-qualifiers is emitted by cc1plus without diagnostics when triggered by a cast operator.
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 19 Apr 2018 15:29:35 +0000
- Subject: [Bug c++/85464] [7 Regression] Wignored-qualifiers is emitted by cc1plus without diagnostics when triggered by a cast operator.
- Auto-submitted: auto-generated
- References: <bug-85464-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85464
--- 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