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: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 19 Apr 2018 14:38:34 +0100
- Subject: Re: [PATCH] PR c++/85464 - missing location for -Wignored-qualifiers diagnostic
- References: <CAH6eHdRXmks=9JrLMnZZF7A6M3E+-SP=ZbmOzyGEwTr_Wn9wbA@mail.gmail.com> <20180419133741.GZ8577@tucnak>
On 19 April 2018 at 14:37, Jakub Jelinek <jakub@redhat.com> wrote:
> 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.
Ah yes, I forgot to mention that I planned to do that.
>
>> 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