From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-x135.google.com (mail-lf1-x135.google.com [IPv6:2a00:1450:4864:20::135]) by sourceware.org (Postfix) with ESMTPS id D0680385842E for ; Mon, 4 Oct 2021 08:48:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D0680385842E Received: by mail-lf1-x135.google.com with SMTP id x27so67998729lfa.9 for ; Mon, 04 Oct 2021 01:48:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition; bh=f4aXIcl3Ad6h4cGADcZPI4GOHjTa8Cz2ugEu7eUIMM8=; b=HtP5DbFdyezfjqzeZFPN4nhqFWofYHsqiIxf35+REJTHWb5LtbTiNxEaVB4+LFfAvA t7bHfaZ7Eqv6cyITJjH1OBnwKuxiOINo3VMFN5JU6HxR7F4iWdg1gJBrTa3E6M93thHD aJM40BAAcKfSvBU3cAf/eJ3KqLbDTnCIdXbvi68Y31sEqbnQIspMmdiwTm/84Q2alXCf UpCt+Lj1cDicRe3UfBWIerVHhIDt6cvkY/cHpYm6EAUIa/7DDk1SKoJ4MAWt9EBUXHmN vxvptZBlGnSleZnKnIVyILvw2zzbJfU0J6vnx60zX+L2hZipWUghEjwaUULJjGvAbBQm tzVQ== X-Gm-Message-State: AOAM530KqaAFW8FJnFloEEK4DGCNNAnLHDcPQSJrdAfJl+lv1oc3PRKj nbmbHhYrS9B5ooUChQnzjSRf8klyr2F1lg== X-Google-Smtp-Source: ABdhPJynTU0Dnz4oBu3yxQ34iS5V2GZG5VmUchXFGmR9HdkGJ9KFG33ph3r0ubJEj5tVxqj+KJMj1g== X-Received: by 2002:a05:6512:3fa5:: with SMTP id x37mr13871675lfa.233.1633337286718; Mon, 04 Oct 2021 01:48:06 -0700 (PDT) Received: from adacore.com ([2a02:2ab8:224:2ce:72b5:e8ff:feef:ee60]) by smtp.gmail.com with ESMTPSA id w24sm732339lfc.99.2021.10.04.01.48.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Oct 2021 01:48:06 -0700 (PDT) Date: Mon, 4 Oct 2021 08:48:03 +0000 From: Pierre-Marie de Rodat To: gcc-patches@gcc.gnu.org Cc: Piotr Trojanek Subject: [Ada] Fix comment about expansion of slices Message-ID: <20211004084803.GA1536869@adacore.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="x+6KMIRAuhnl3hBn" Content-Disposition: inline X-Spam-Status: No, score=-13.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Oct 2021 08:48:09 -0000 --x+6KMIRAuhnl3hBn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Cleanup related to handling of array accesses in CodePeer mode. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * checks.adb (Selected_Range_Checks): Fix style. * exp_ch4.adb (Expand_N_Slice): Fix style and comment. * sem_res.adb (Resolve_Indexed_Component): Fix style. --x+6KMIRAuhnl3hBn Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="patch.diff" diff --git a/gcc/ada/checks.adb b/gcc/ada/checks.adb --- a/gcc/ada/checks.adb +++ b/gcc/ada/checks.adb @@ -10400,7 +10400,7 @@ package body Checks is Exptyp : Entity_Id; Cond : Node_Id := Empty; Do_Access : Boolean := False; - Wnode : Node_Id := Warn_Node; + Wnode : Node_Id := Warn_Node; Ret_Result : Check_Result := (Empty, Empty); Num_Checks : Natural := 0; diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb --- a/gcc/ada/exp_ch4.adb +++ b/gcc/ada/exp_ch4.adb @@ -11546,7 +11546,7 @@ package body Exp_Ch4 is then Par := Parent (Par); - -- Any other case is not what we are looking for + -- Any other case is not what we are looking for else return False; @@ -11582,7 +11582,7 @@ package body Exp_Ch4 is -- Local variables - Pref : constant Node_Id := Prefix (N); + Pref : constant Node_Id := Prefix (N); -- Start of processing for Expand_N_Slice @@ -11608,7 +11608,7 @@ package body Exp_Ch4 is -- situation correctly in the assignment statement expansion). -- 2. Prefix of indexed component (the slide is optimized away in this - -- case, see the start of Expand_N_Slice.) + -- case, see the start of Expand_N_Indexed_Component.) -- 3. Object renaming declaration, since we want the name of the -- slice, not the value. diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb --- a/gcc/ada/sem_res.adb +++ b/gcc/ada/sem_res.adb @@ -9253,7 +9253,7 @@ package body Sem_Res is ------------------------------- procedure Resolve_Indexed_Component (N : Node_Id; Typ : Entity_Id) is - Name : constant Node_Id := Prefix (N); + Name : constant Node_Id := Prefix (N); Expr : Node_Id; Array_Type : Entity_Id := Empty; -- to prevent junk warning Index : Node_Id; --x+6KMIRAuhnl3hBn--