From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20948 invoked by alias); 16 Sep 2019 15:42:20 -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 20940 invoked by uid 89); 16 Sep 2019 15:42:20 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-5.6 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.1 spammy=H*i:sk:3c829e5, H*f:sk:3c829e5 X-HELO: us-smtp-delivery-1.mimecast.com Received: from us-smtp-2.mimecast.com (HELO us-smtp-delivery-1.mimecast.com) (207.211.31.81) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 16 Sep 2019 15:42:18 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1568648537; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/DYHKL4pNT6MjeccUrW8FZcq4FszOxShRVr2qC+scqE=; b=L6Cq17qPGyheYZX9sVC8P0Wkfy/Y5RuCcKwq34810UzgexCDhrIukwzZWEQcebf4P7rwe5 l7X0MtrtKkjE5Cg9iBc8DSz+1nCXPf3OXkTtCYvwGledxiOyy6jVeaVXaRVZJ1Wh62f8YO YV5Ya7jVbXcdKiCRmiAJXyK78+mWtt4= Received: from mail-oi1-f200.google.com (mail-oi1-f200.google.com [209.85.167.200]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-301-L4guZGSuPbKUDgUX79f7Wg-1; Mon, 16 Sep 2019 11:42:15 -0400 Received: by mail-oi1-f200.google.com with SMTP id m8so52236oim.14 for ; Mon, 16 Sep 2019 08:42:14 -0700 (PDT) MIME-Version: 1.0 References: <3c829e52-803c-f19e-470d-96cb53a33a00@oracle.com> In-Reply-To: <3c829e52-803c-f19e-470d-96cb53a33a00@oracle.com> From: Jason Merrill Date: Mon, 16 Sep 2019 15:42:00 -0000 Message-ID: Subject: Re: [C++ Patch] Another bunch of location fixes To: Paolo Carlini Cc: "gcc-patches@gcc.gnu.org" X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2019-09/txt/msg00949.txt.bz2 On Mon, Sep 16, 2019 at 5:22 AM Paolo Carlini wr= ote: > > On 15/09/19 16:22, Jason Merrill wrote: > > On 9/12/19 9:41 AM, Paolo Carlini wrote: > >> + if (!valid_array_size_p (dname > >> + ? declarator->id_loc : input_location, > > > > Use the id_loc local variable? > > This diagnostic is inside the loop over declarator->declarator. > Eventually, outside the loop, the id_loc local is updated to the final > declarator->id_loc or input_location. Norrmally in the loop we use the > current declarator->id_loc: what I tested seems more correct to me (we > have to account for input_location too because valid_array_size_p, > shared with the C front-end, wants a sound location) OK. Jason