From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 92094 invoked by alias); 16 Jan 2019 15:57:08 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 91464 invoked by uid 89); 16 Jan 2019 15:57:07 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 spammy=HContent-Transfer-Encoding:8bit X-HELO: mail-qt1-f172.google.com Received: from mail-qt1-f172.google.com (HELO mail-qt1-f172.google.com) (209.85.160.172) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 16 Jan 2019 15:57:06 +0000 Received: by mail-qt1-f172.google.com with SMTP id p17so7677801qtl.5 for ; Wed, 16 Jan 2019 07:57:06 -0800 (PST) Return-Path: Received: from [192.168.1.115] (209-6-216-142.s141.c3-0.smr-cbr1.sbo-smr.ma.cable.rcncustomer.com. [209.6.216.142]) by smtp.gmail.com with ESMTPSA id k6sm59045767qtk.41.2019.01.16.07.57.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 16 Jan 2019 07:57:03 -0800 (PST) Subject: Re: [C++ Patch] Use locations[ds_storage_class] in error messages about ill-formed uses of mutable To: Paolo Carlini , Martin Sebor , "gcc-patches@gcc.gnu.org" References: <0b24286d-d59a-9d9c-b0a5-f21ad1038fa1@gmail.com> <42e7adc9-fcad-bb15-f0bf-ae95cea74c68@oracle.com> From: Jason Merrill Message-ID: Date: Wed, 16 Jan 2019 15:57:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.1 MIME-Version: 1.0 In-Reply-To: <42e7adc9-fcad-bb15-f0bf-ae95cea74c68@oracle.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2019-01/txt/msg00922.txt.bz2 On 1/15/19 5:27 PM, Paolo Carlini wrote: > Hi Martin, > > On 15/01/19 21:42, Martin Sebor wrote: >> On 1/15/19 9:58 AM, Paolo Carlini wrote: >>> Hi, >>> >>> something a little different from my last patches but nevertheless >>> pretty straightforward (noticed while I was wondering whether we >>> should immediately move the location_t grokdeclarator local even >>> further up). Tested x86_64-linux, as usual. >> >> Since you're already making changes to the tests, would be too much >> more work to also add quoting around static and const in the error >> messages below where mutable is already quoted: >> >> -      error ("static %qs cannot be declared %", name); >> +      error_at (sloc, "static %qs cannot be declared %", >> name); >>        storage_class = sc_none; >>      } >>        else if (type_quals & TYPE_QUAL_CONST) >>      { >> -      error ("const %qs cannot be declared %", name); >> +      error_at (sloc, "const %qs cannot be declared %", name); >> >> (I can see it being a hassle if there were many other tests where >> the messages expect to find static and const with no quotes.) > > No problem, that's not the case. I'm finishing testing the below, then. OK. Jason