From patchwork Fri Jan 7 16:27:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Marie de Rodat X-Patchwork-Id: 1576712 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=fN3QEx2V; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4JVpv572WXz9t25 for ; Sat, 8 Jan 2022 03:43:28 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 140BC3857C44 for ; Fri, 7 Jan 2022 16:43:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 140BC3857C44 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1641573806; bh=9leuRLTb8BKdwjv7Uh7/SsJO6W2KizQJ2MVegzX2v9o=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=fN3QEx2VHlKId4HcPI+pHQ7U+8HYwu5kvUom2IIQYqou7smrAdjtHw/YHqJS5hXst 0nIAN0d/t1DpaFflTmWYCZuy5KEWxrN1jI8NVXOjjIBQRvRdf+rtYDOZbcvWn70lFI SKdHsOu+6XREg8coCkTOoTrrjLbH06y2Ye4fbU90= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by sourceware.org (Postfix) with ESMTPS id 2E5353857C75 for ; Fri, 7 Jan 2022 16:27:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2E5353857C75 Received: by mail-wr1-x436.google.com with SMTP id t28so5288610wrb.4 for ; Fri, 07 Jan 2022 08:27:14 -0800 (PST) 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=9leuRLTb8BKdwjv7Uh7/SsJO6W2KizQJ2MVegzX2v9o=; b=XibEBvx1LZGAO1EABfZqKM+vymQRf9e3c52IkKM7Vu64ThiKNhI8dzbSOc6Jep2pcl WxDyJ1hPr+ihuPRoLldPeyczumvJFY8knmPhKy9I3zk4D34TmK89R7CvAAXT7eaDGVUk TTvIIQxaUezpEizBdApwj0CzTYeBYTNRotwGqX/6gT8xBSjmkVC27wEYd4U04RmixDOT r3IsooTYvK+211yZO1Re8rTlBSzGz9XspCNB9WVwh1fvhWenLCraO2UL1ny1OCEs1FQ2 L0EXXBOZVQ1gwicmlpJZEZnLR/igGpItJ7Pim164D6Y5N2lgpguL+8TGZdyUjI77YJtm 1mkg== X-Gm-Message-State: AOAM530YPPFkElhyAxAQE+vjbOzgVK/XD8R65azP8eN6RmRPpVjrEMZE k49qIW/NyLA5vVD+c/QseMv8A/LMbYqx/Q== X-Google-Smtp-Source: ABdhPJwW9BhO4US055TSs9zdsCfCP+HN+3ZH/V+Q3Ot0OIOFR4YSoTcmYcMFPl9QBX6/H3E20iRZcA== X-Received: by 2002:a5d:6482:: with SMTP id o2mr56873767wri.16.1641572833214; Fri, 07 Jan 2022 08:27:13 -0800 (PST) Received: from adacore.com ([45.147.211.82]) by smtp.gmail.com with ESMTPSA id g18sm5071106wrv.42.2022.01.07.08.27.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jan 2022 08:27:12 -0800 (PST) Date: Fri, 7 Jan 2022 16:27:12 +0000 To: gcc-patches@gcc.gnu.org Subject: [Ada] Remove extra space before THEN keywords Message-ID: <20220107162712.GA948539@adacore.com> MIME-Version: 1.0 Content-Disposition: inline X-Spam-Status: No, score=-13.2 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-Patchwork-Original-From: Pierre-Marie de Rodat via Gcc-patches From: Pierre-Marie de Rodat Reply-To: Pierre-Marie de Rodat Cc: Piotr Trojanek Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" Style cleanup; semantics is unaffected. Offending occurrences found with: $ grep "[A-Za-z0-9\)]+ +then$" -C 3 and reviewed manually, because some of them were due to explicit layout. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_ch5.adb, exp_disp.adb, exp_util.adb, par-ch4.adb, sem_ch13.adb: Remove extra space before THEN that occurs at the end of a line. diff --git a/gcc/ada/exp_ch5.adb b/gcc/ada/exp_ch5.adb --- a/gcc/ada/exp_ch5.adb +++ b/gcc/ada/exp_ch5.adb @@ -2664,7 +2664,7 @@ package body Exp_Ch5 is Rewrite (Lhs, OK_Convert_To (Base_Type (Typ), Lhs)); Apply_Discriminant_Check (Rhs, Typ, Lhs); - elsif Is_Array_Type (Typ) and then Is_Constrained (Typ) then + elsif Is_Array_Type (Typ) and then Is_Constrained (Typ) then Rewrite (Rhs, OK_Convert_To (Base_Type (Typ), Rhs)); Rewrite (Lhs, OK_Convert_To (Base_Type (Typ), Lhs)); Apply_Length_Check (Rhs, Typ); diff --git a/gcc/ada/exp_disp.adb b/gcc/ada/exp_disp.adb --- a/gcc/ada/exp_disp.adb +++ b/gcc/ada/exp_disp.adb @@ -4615,7 +4615,7 @@ package body Exp_Disp is -- case concerning the need for this check, and this topic may -- go back to the ARG. - if not Is_Abstract_Subprogram (Prim) then + if not Is_Abstract_Subprogram (Prim) then Formal := First_Formal (Prim); while Present (Formal) loop Check_Premature_Freezing (Prim, Typ, Etype (Formal)); diff --git a/gcc/ada/exp_util.adb b/gcc/ada/exp_util.adb --- a/gcc/ada/exp_util.adb +++ b/gcc/ada/exp_util.adb @@ -3752,7 +3752,7 @@ package body Exp_Util is -- Anonymous arrays in object declarations have no explicit declaration -- so use the related object declaration as the insertion point. - elsif Is_Itype (Work_Typ) and then Is_Array_Type (Work_Typ) then + elsif Is_Itype (Work_Typ) and then Is_Array_Type (Work_Typ) then Typ_Decl := Associated_Node_For_Itype (Work_Typ); -- Derived types with the full view as parent do not have a partial diff --git a/gcc/ada/par-ch4.adb b/gcc/ada/par-ch4.adb --- a/gcc/ada/par-ch4.adb +++ b/gcc/ada/par-ch4.adb @@ -2968,7 +2968,7 @@ package body Ch4 is Save_Scan_State (Scan_State); Scan; -- past FOR - if Token = Tok_All or else Token = Tok_Some then + if Token = Tok_All or else Token = Tok_Some then Restore_Scan_State (Scan_State); -- To FOR Node1 := P_Quantified_Expression; diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb --- a/gcc/ada/sem_ch13.adb +++ b/gcc/ada/sem_ch13.adb @@ -16005,7 +16005,7 @@ package body Sem_Ch13 is function Valid_Empty (E : Entity_Id) return Boolean is begin - if Etype (E) /= Typ or else Scope (E) /= Scope (Typ) then + if Etype (E) /= Typ or else Scope (E) /= Scope (Typ) then return False; elsif Ekind (E) = E_Constant then