This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] PR c++/85464 - missing location for -Wignored-qualifiers diagnostic
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 19 Apr 2018 15:37:41 +0200
- Subject: Re: [PATCH] PR c++/85464 - missing location for -Wignored-qualifiers diagnostic
- References: <CAH6eHdRXmks=9JrLMnZZF7A6M3E+-SP=ZbmOzyGEwTr_Wn9wbA@mail.gmail.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
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 <jwakely@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