From patchwork Thu Nov 30 10:19:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Marc_Poulhi=C3=A8s?= X-Patchwork-Id: 171814 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp282199vqy; Thu, 30 Nov 2023 02:21:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IEUzaDQhlhvO1XjwuoIO6ZSv5GLcOcIkSfbb0pVG/V3lxqoV/+wK0rFllGpoixmIWv/KO9m X-Received: by 2002:a05:620a:628d:b0:77d:7533:5c07 with SMTP id ov13-20020a05620a628d00b0077d75335c07mr26818307qkn.45.1701339685200; Thu, 30 Nov 2023 02:21:25 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1701339685; cv=pass; d=google.com; s=arc-20160816; b=nrKfKhQ4E6jxIb3wTesB+tDlOs30uleLr2i24CBCwplEXkVUNJbSB3mI4fF3YQyYtw DcoFMZx40wAVgeDSUyk8KDCn2wy9QNMaPisfU4VmQTlKmHN12/CozGAIiY6CKDs9iSrT uqlzB5+91Gy2m575MxCAX2sVxYRluLdzvNt6AcxEvTEjXsrk0466FaBnC6JRnurVAOw6 L4N7LP+u115zmMtP+c8hCj38USwBQxaf0TOuEO80LEWwJ1JSNUTCE/71ua/pwx9MUluN NJ8mU4DiFhQWU/iE+H5iqaGoNbaL1Pz07HYLJ4SPs0KBZd6ydXSmipXOokuaxfY3jfKu BQEg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature :arc-filter:dmarc-filter:delivered-to; bh=FoR6vl4JZs2F+GPVzM/l9+Tbz1Ib1nUOfCQVAejcIno=; fh=xkXw4ZjwHxuTwIHh5BpbVWFYGO+bP8cUYTTqcq/2BVI=; b=vRCKQXv5IAmAjAa9S02nTW87masbA/4PvndfR6dCRa63k3qhkdpCmJYS2E6kcpeDml j68cPXxfqrWVYVxzMA35XpL+8E4+eWGzmtU1tl3wSIro2/81JFbD61ICtNK+ayGlxO0q Fzz6dIo1hZ4J6pz0JVFovz9ROyGfdEl7DHHWLPBQpuoX+GM9SfWFZPl1mi/dIuy7Ndb+ SNPtdeA8x66y7qMoZ61K37cJOI2tsWjl6MZKbiey3LEkB3IcD7Gbt8il36rvSFRAxLHf X1p/ThvnLjiNXfNLjOBHLtIyvcAgFH1xtsmlwDs/aVrBlTJGltDpqqZGWZM3wu0vUErW 1mcQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@adacore.com header.s=google header.b=MmnGVDJs; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=adacore.com Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id bq35-20020a05620a46a300b0077da2726ac9si784390qkb.226.2023.11.30.02.21.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 02:21:25 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@adacore.com header.s=google header.b=MmnGVDJs; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=adacore.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id ACA29384F008 for ; Thu, 30 Nov 2023 10:20:56 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by sourceware.org (Postfix) with ESMTPS id C79FC3858287 for ; Thu, 30 Nov 2023 10:19:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C79FC3858287 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org C79FC3858287 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::336 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701339558; cv=none; b=AEeuGVSc90VYcXOuGRU2qDSx61Q/8yhh5tPfUnRQ/6XGGgfe0JbwMXh7dWDFSSxEQEewiO++4pIbctynXVDjeiLSvUGh7c6DY6eVUhWSRnVk79ZbAOeUknQ8r97f5VY+W+w0m6h4Vh/eVATGBUQ8Uaxc2yddtiy4KwD1edtYOdE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701339558; c=relaxed/simple; bh=gGGKa1oPf2UJhgaMtDzM3wm4XHF4gmgJiqNQedB1fow=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=jgw5bZojAYbGKHRJAMvpvbMBpuZby372gHDon7B0h1xCcav8BjHn8Df0zsFAUKoohjTFUStLgLPucWmkMaFjIfbjOAFGuzBFJEVShZwSn5oGAgJMTtCB2hSrhnCsVmAI6DZe3Xmyk3xSnq25zjeSp1yZY6sCls4Y77EOPKwa7Tg= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-40b27b498c3so6909525e9.0 for ; Thu, 30 Nov 2023 02:19:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1701339552; x=1701944352; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=FoR6vl4JZs2F+GPVzM/l9+Tbz1Ib1nUOfCQVAejcIno=; b=MmnGVDJs3lanSSymuLhRJ6Fm7afpKb0PDINKeAydo5YahcOnXyr62VwCG0a6lW9DDf HUaud9j67qw7cvSYiVhAGBX3h6YRfrEfGu76bzOFXlyqAcr0tZuVVSUT5zdXDLqb3S3r st09kbhJTLAzIa1psMRc/6gozcPXpnwp76NYBtGMEBTMYXWEPrez4MmgWeS240e2Kvno LOxBXqXxacvA5QCxLudUy3C9iQIHTkAdQRO2kcoR6nZWruspohT41j0KsIaUrhkDwJa9 mhSSRd14Em1EBIECxRUiCh7YKRU1J/YZh33Dy7+yXzyV2J+yuW8xTO0jSw+29cbjGiqk 3Snw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701339552; x=1701944352; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=FoR6vl4JZs2F+GPVzM/l9+Tbz1Ib1nUOfCQVAejcIno=; b=N8ke1v6lOe2Na3PvqX9ok4+6m8xqPO2hLnCtBUrhVNpS50fB+ceoScNt7NoKBA8aSq PZ13FDqiLNVJD7aQympd69VibeUTFpisQ2Z+QWPhYuLNyOEZmptOzhLLZYWZi3x+1KCN Z6ZJUVGYa1S/MTfkCpAayiobBrPuREAPuaGyUJGtiDrOO4oLxiBXvaVsVVjJAlnsgauk fvIUynLf0bvmBhdOLMOUkUGprZwcAjPiosGfBPUzHeOQ1Mbxglkn0x3cTTx/ZL0f2xxu eEovcV3PZjyBMc3oKPjgONzCWTBiU//NCcGkR0U5GGZKRUOImSA7TrenE9QWaoOVw/+p 6N9Q== X-Gm-Message-State: AOJu0YzzE+OGICFLE8WzJAJJVT5gicy/jmJ+IZCRQzyKJvnJFlR3Pd7e I9ErCV/eczRwHhuCaSrNAlxomk1foIoJ2NAdO2cc2A== X-Received: by 2002:a05:600c:1987:b0:409:1841:3f42 with SMTP id t7-20020a05600c198700b0040918413f42mr15415658wmq.13.1701339552193; Thu, 30 Nov 2023 02:19:12 -0800 (PST) Received: from poulhies-Precision-5550.telnowedge.local (lmontsouris-659-1-24-67.w81-250.abo.wanadoo.fr. [81.250.175.67]) by smtp.gmail.com with ESMTPSA id w17-20020a05600c475100b0040b45356b72sm5162460wmo.33.2023.11.30.02.19.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 02:19:11 -0800 (PST) From: =?utf-8?q?Marc_Poulhi=C3=A8s?= To: gcc-patches@gcc.gnu.org Cc: Yannick Moy Subject: [COMMITTED] ada: Fix spelling of functions with(out) "side effects" Date: Thu, 30 Nov 2023 11:19:10 +0100 Message-ID: <20231130101910.3094256-1-poulhies@adacore.com> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 X-Spam-Status: No, score=-13.7 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, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783983961763109622 X-GMAIL-MSGID: 1783983961763109622 From: Yannick Moy Correct spelling does not include an hyphen. Fix comments and one error message. Also fix other mispellings of "side-effect" or "side effect" depending on the case (adjective should have hyphen), and "side-effect-free" with double hyphen as an adjective. gcc/ada/ * checks.adb, exp_aggr.adb, exp_ch4.ads, exp_ch5.adb, exp_util.adb, exp_util.ads, inline.adb, sem_ch13.adb, sem_ch6.adb, sem_ch8.adb, sem_prag.adb, sem_util.ads: Fix comments and typos. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/checks.adb | 2 +- gcc/ada/exp_aggr.adb | 2 +- gcc/ada/exp_ch4.ads | 2 +- gcc/ada/exp_ch5.adb | 4 +-- gcc/ada/exp_util.adb | 86 ++++++++++++++++++++++---------------------- gcc/ada/exp_util.ads | 6 ++-- gcc/ada/inline.adb | 2 +- gcc/ada/sem_ch13.adb | 4 +-- gcc/ada/sem_ch6.adb | 4 +-- gcc/ada/sem_ch8.adb | 2 +- gcc/ada/sem_prag.adb | 12 +++---- gcc/ada/sem_util.ads | 2 +- 12 files changed, 64 insertions(+), 64 deletions(-) diff --git a/gcc/ada/checks.adb b/gcc/ada/checks.adb index 84a21b2c177..14e82f2adc6 100644 --- a/gcc/ada/checks.adb +++ b/gcc/ada/checks.adb @@ -1664,7 +1664,7 @@ package body Checks is end if; -- If the expressions for the discriminants are identical - -- and it is side-effect free (for now just an entity), + -- and it is side-effect-free (for now just an entity), -- this may be a shared constraint, e.g. from a subtype -- without a constraint introduced as a generic actual. -- Examine other discriminants if any. diff --git a/gcc/ada/exp_aggr.adb b/gcc/ada/exp_aggr.adb index 513fc2ded9a..2d02bad0c4c 100644 --- a/gcc/ada/exp_aggr.adb +++ b/gcc/ada/exp_aggr.adb @@ -1936,7 +1936,7 @@ package body Exp_Aggr is Aggr_Low : constant Node_Id := Duplicate_Subexpr_No_Checks (Aggr_L); Aggr_High : constant Node_Id := Duplicate_Subexpr_No_Checks (Aggr_H); - -- After Duplicate_Subexpr these are side-effect free + -- After Duplicate_Subexpr these are side-effect-free Assoc : Node_Id; Choice : Node_Id; diff --git a/gcc/ada/exp_ch4.ads b/gcc/ada/exp_ch4.ads index 39177cde369..e240380bb77 100644 --- a/gcc/ada/exp_ch4.ads +++ b/gcc/ada/exp_ch4.ads @@ -97,7 +97,7 @@ package Exp_Ch4 is -- individually to yield the required Boolean result. Loc is the -- location for the generated nodes. Typ is the type of the record, and -- Lhs, Rhs are the record expressions to be compared, these - -- expressions need not be analyzed but have to be side-effect free. + -- expressions need not be analyzed but have to be side-effect-free. -- Nod provides the Sloc value for generated code. procedure Expand_Set_Membership (N : Node_Id); diff --git a/gcc/ada/exp_ch5.adb b/gcc/ada/exp_ch5.adb index d946f6dda5e..bc6124305cb 100644 --- a/gcc/ada/exp_ch5.adb +++ b/gcc/ada/exp_ch5.adb @@ -162,7 +162,7 @@ package body Exp_Ch5 is procedure Expand_Assign_With_Target_Names (N : Node_Id); -- (AI12-0125): N is an assignment statement whose RHS contains occurrences -- of @ that designate the value of the LHS of the assignment. If the LHS - -- is side-effect free the target names can be replaced with a copy of the + -- is side-effect-free the target names can be replaced with a copy of the -- LHS; otherwise the semantics of the assignment is described in terms of -- a procedure with an in-out parameter, and expanded as such. @@ -2304,7 +2304,7 @@ package body Exp_Ch5 is Name => Relocate_Node (LHS), Expression => New_RHS)); - -- The left-hand side is not a direct name, but is side-effect free. + -- The left-hand side is not a direct name, but is side-effect-free. -- Capture its value in a temporary to avoid generating a procedure. -- We don't do this optimization if the target object's type may need -- finalization actions, because we don't want extra finalizations to diff --git a/gcc/ada/exp_util.adb b/gcc/ada/exp_util.adb index 3dc34fcb493..17fde44d7ab 100644 --- a/gcc/ada/exp_util.adb +++ b/gcc/ada/exp_util.adb @@ -237,7 +237,7 @@ package body Exp_Util is function Side_Effect_Free_Attribute (Name : Name_Id) return Boolean; -- Return True if the evaluation of the given attribute is considered - -- side-effect free, independently of its prefix and expressions. + -- side-effect-free, independently of its prefix and expressions. ------------------------------------- -- Activate_Atomic_Synchronization -- @@ -9356,7 +9356,7 @@ package body Exp_Util is begin -- Build-in-place calls usually appear in 'reference format. Note that -- the accessibility check machinery may add an extra 'reference due to - -- side effect removal. + -- side-effect removal. while Nkind (Call) = N_Reference loop Call := Prefix (Call); @@ -12062,7 +12062,7 @@ package body Exp_Util is then return; - -- No action needed for side-effect free expressions + -- No action needed for side-effect-free expressions elsif Check_Side_Effects and then Side_Effect_Free (Exp, Name_Req, Variable_Ref) @@ -12087,15 +12087,15 @@ package body Exp_Util is Scope_Suppress.Suppress := (others => True); - -- If this is a side-effect free attribute reference whose expressions - -- are also side-effect free and whose prefix is not a name, remove the + -- If this is a side-effect-free attribute reference whose expressions + -- are also side-effect-free and whose prefix is not a name, remove the -- side effects of the prefix. A copy of the prefix is required in this -- case and it is better not to make an additional one for the attribute -- itself, because the return type of many of them is universal integer, -- which is a very large type for a temporary. -- The prefix of an attribute reference Reduce may be syntactically an -- aggregate, but will be expanded into a loop, so no need to remove - -- side-effects. + -- side effects. if Nkind (Exp) = N_Attribute_Reference and then Side_Effect_Free_Attribute (Attribute_Name (Exp)) @@ -12329,7 +12329,7 @@ package body Exp_Util is -- Otherwise we generate a reference to the expression else - -- When generating C code we cannot consider side effect free object + -- When generating C code we cannot consider side-effect-free object -- declarations that have discriminants and are initialized by means -- of a function call since on this target there is no secondary -- stack to store the return value and the expander may generate an @@ -13681,12 +13681,12 @@ package body Exp_Util is function Safe_Prefixed_Reference (N : Node_Id) return Boolean; -- The argument N is a construct where the Prefix is dereferenced if it -- is an access type and the result is a variable. The call returns True - -- if the construct is side effect free (not considering side effects in + -- if the construct is side-effect-free (not considering side effects in -- other than the prefix which are to be tested by the caller). function Within_In_Parameter (N : Node_Id) return Boolean; -- Determines if N is a subcomponent of a composite in-parameter. If so, - -- N is not side-effect free when the actual is global and modifiable + -- N is not side-effect-free when the actual is global and modifiable -- indirectly from within a subprogram, because it may be passed by -- reference. The front-end must be conservative here and assume that -- this may happen with any array or record type. On the other hand, we @@ -13703,7 +13703,7 @@ package body Exp_Util is function Safe_Prefixed_Reference (N : Node_Id) return Boolean is begin - -- If prefix is not side effect free, definitely not safe + -- If prefix is not side-effect-free, definitely not safe if not Side_Effect_Free (Prefix (N), Name_Req, Variable_Ref) then return False; @@ -13805,7 +13805,7 @@ package body Exp_Util is then return False; - -- All other cases are side effect free + -- All other cases are side-effect-free else return True; @@ -13846,7 +13846,7 @@ package body Exp_Util is -- However, we would prefer to consider that they are side effects, -- since the back end CSE does not work very well on expressions which -- can raise Constraint_Error. On the other hand if we don't consider - -- them to be side effect free, then we get some awkward expansions + -- them to be side-effect-free, then we get some awkward expansions -- in -gnato mode, resulting in code insertions at a point where we -- do not have a clear model for performing the insertions. @@ -13854,7 +13854,7 @@ package body Exp_Util is if Is_Entity_Name (N) then - -- A type reference is always side effect free + -- A type reference is always side-effect-free if Is_Type (Entity (N)) then return True; @@ -13875,12 +13875,12 @@ package body Exp_Util is return True; end if; - -- A value known at compile time is always side effect free + -- A value known at compile time is always side-effect-free elsif Compile_Time_Known_Value (N) then return True; - -- A variable renaming is not side-effect free, because the renaming + -- A variable renaming is not side-effect-free, because the renaming -- will function like a macro in the front-end in some cases, and an -- assignment can modify the component designated by N, so we need to -- create a temporary for it. @@ -13914,7 +13914,7 @@ package body Exp_Util is return Safe_Prefixed_Reference (RO); -- In all other cases, designated object cannot be changed so - -- we are side effect free. + -- we are side-effect-free. else return True; @@ -13954,8 +13954,8 @@ package body Exp_Util is case Nkind (N) is - -- An attribute reference is side-effect free if its expressions - -- are side-effect free and its prefix is side-effect free or is + -- An attribute reference is side-effect-free if its expressions + -- are side-effect-free and its prefix is side-effect-free or is -- an entity reference. when N_Attribute_Reference => @@ -13967,8 +13967,8 @@ package body Exp_Util is or else Side_Effect_Free (Prefix (N), Name_Req, Variable_Ref)); - -- A binary operator is side effect free if and both operands are - -- side effect free. For this purpose binary operators include + -- A binary operator is side-effect-free if and both operands are + -- side-effect-free. For this purpose binary operators include -- short circuit forms. when N_Binary_Op @@ -13989,14 +13989,14 @@ package body Exp_Util is else Side_Effect_Free (Alternatives (N), Name_Req, Variable_Ref)); - -- An explicit dereference is side effect free only if it is - -- a side effect free prefixed reference. + -- An explicit dereference is side-effect-free only if it is + -- a side-effect-free prefixed reference. when N_Explicit_Dereference => return Safe_Prefixed_Reference (N); - -- An expression with action is side effect free if its expression - -- is side effect free and it has no actions. + -- An expression with action is side-effect-free if its expression + -- is side-effect-free and it has no actions. when N_Expression_With_Actions => return @@ -14004,14 +14004,14 @@ package body Exp_Util is and then Side_Effect_Free (Expression (N), Name_Req, Variable_Ref); - -- A call to _rep_to_pos is side effect free, since we generate + -- A call to _rep_to_pos is side-effect-free, since we generate -- this pure function call ourselves. Moreover it is critically -- important to make this exception, since otherwise we can have - -- discriminants in array components which don't look side effect + -- discriminants in array components which don't look side-effect -- free in the case of an array whose index type is an enumeration -- type with an enumeration rep clause. - -- All other function calls are not side effect free + -- All other function calls are not side-effect-free when N_Function_Call => return @@ -14021,8 +14021,8 @@ package body Exp_Util is (First (Parameter_Associations (N)), Name_Req, Variable_Ref); - -- An IF expression is side effect free if it's of a scalar type, and - -- all its components are all side effect free (conditions and then + -- An IF expression is side-effect-free if it's of a scalar type, and + -- all its components are all side-effect-free (conditions and then -- actions and else actions). We restrict to scalar types, since it -- is annoying to deal with things like (if A then B else C)'First -- where the type involved is a string type. @@ -14033,9 +14033,9 @@ package body Exp_Util is and then Side_Effect_Free (Expressions (N), Name_Req, Variable_Ref); - -- An indexed component is side effect free if it is a side + -- An indexed component is side-effect-free if it is a side -- effect free prefixed reference and all the indexing - -- expressions are side effect free. + -- expressions are side-effect-free. when N_Indexed_Component => return @@ -14043,7 +14043,7 @@ package body Exp_Util is and then Safe_Prefixed_Reference (N); -- A type qualification, type conversion, or unchecked expression is - -- side effect free if the expression is side effect free. + -- side-effect-free if the expression is side-effect-free. when N_Qualified_Expression | N_Type_Conversion @@ -14051,35 +14051,35 @@ package body Exp_Util is => return Side_Effect_Free (Expression (N), Name_Req, Variable_Ref); - -- A selected component is side effect free only if it is a side + -- A selected component is side-effect-free only if it is a side -- effect free prefixed reference. when N_Selected_Component => return Safe_Prefixed_Reference (N); - -- A range is side effect free if the bounds are side effect free + -- A range is side-effect-free if the bounds are side-effect-free when N_Range => return Side_Effect_Free (Low_Bound (N), Name_Req, Variable_Ref) and then Side_Effect_Free (High_Bound (N), Name_Req, Variable_Ref); - -- A slice is side effect free if it is a side effect free - -- prefixed reference and the bounds are side effect free. + -- A slice is side-effect-free if it is a side-effect-free + -- prefixed reference and the bounds are side-effect-free. when N_Slice => return Side_Effect_Free (Discrete_Range (N), Name_Req, Variable_Ref) and then Safe_Prefixed_Reference (N); - -- A unary operator is side effect free if the operand - -- is side effect free. + -- A unary operator is side-effect-free if the operand + -- is side-effect-free. when N_Unary_Op => return Side_Effect_Free (Right_Opnd (N), Name_Req, Variable_Ref); - -- An unchecked type conversion is side effect free only if it - -- is safe and its argument is side effect free. + -- An unchecked type conversion is side-effect-free only if it + -- is safe and its argument is side-effect-free. when N_Unchecked_Type_Conversion => return @@ -14087,7 +14087,7 @@ package body Exp_Util is and then Side_Effect_Free (Expression (N), Name_Req, Variable_Ref); - -- A literal is side effect free + -- A literal is side-effect-free when N_Character_Literal | N_Integer_Literal @@ -14096,7 +14096,7 @@ package body Exp_Util is => return True; - -- An aggregate is side effect free if all its values are compile + -- An aggregate is side-effect-free if all its values are compile -- time known. when N_Aggregate => @@ -14112,7 +14112,7 @@ package body Exp_Util is end case; end Side_Effect_Free; - -- A list is side effect free if all elements of the list are side + -- A list is side-effect-free if all elements of the list are side -- effect free. function Side_Effect_Free diff --git a/gcc/ada/exp_util.ads b/gcc/ada/exp_util.ads index eb737d67769..267a127ec5e 100644 --- a/gcc/ada/exp_util.ads +++ b/gcc/ada/exp_util.ads @@ -669,7 +669,7 @@ package Exp_Util is -- of the same expression won't generate multiple side effects, whereas -- Force_Evaluation further guarantees that all evaluations will yield -- the same result. If Mode is Relaxed then calls to this subprogram have - -- no effect if Exp is side-effect free; if Mode is Strict and Exp is not + -- no effect if Exp is side-effect-free; if Mode is Strict and Exp is not -- a static expression then no side-effect check is performed on Exp and -- temporaries are unconditionally generated. -- @@ -1075,7 +1075,7 @@ package Exp_Util is -- side effect (used in implementing Force_Evaluation). Note: after call to -- Remove_Side_Effects, it is safe to call New_Copy_Tree to obtain a copy -- of the resulting expression. If Check_Side_Effects is set to True then - -- no action is performed if Exp is known to be side-effect free. + -- no action is performed if Exp is known to be side-effect-free. -- -- Related_Id denotes the entity of the context where Expr appears. Flags -- Is_Low_Bound and Is_High_Bound specify whether the expression to check @@ -1206,7 +1206,7 @@ package Exp_Util is (L : List_Id; Name_Req : Boolean := False; Variable_Ref : Boolean := False) return Boolean; - -- Determines if all elements of the list L are side-effect free. Name_Req + -- Determines if all elements of the list L are side-effect-free. Name_Req -- and Variable_Ref are as described above. procedure Silly_Boolean_Array_Not_Test (N : Node_Id; T : Entity_Id); diff --git a/gcc/ada/inline.adb b/gcc/ada/inline.adb index 1fbbe6d32c2..cc2bc3ac18a 100644 --- a/gcc/ada/inline.adb +++ b/gcc/ada/inline.adb @@ -3726,7 +3726,7 @@ package body Inline is Insert_After (Parent (Entity (N)), Blk); -- If the context is an assignment, and the left-hand side is free of - -- side-effects, the replacement is also safe. + -- side effects, the replacement is also safe. elsif Nkind (Parent (N)) = N_Assignment_Statement and then diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb index 302fab74757..8f6fa3af0f8 100644 --- a/gcc/ada/sem_ch13.adb +++ b/gcc/ada/sem_ch13.adb @@ -10794,7 +10794,7 @@ package body Sem_Ch13 is Set_Analyzed (FBody); end if; - -- Static predicate functions are always side-effect free, and + -- Static predicate functions are always side-effect-free, and -- in most cases dynamic predicate functions are as well. Mark -- them as such whenever possible, so redundant predicate checks -- can be optimized. If there is a variable reference within the @@ -16141,7 +16141,7 @@ package body Sem_Ch13 is function Extract_Entity (Expr : Node_Id) return Entity_Id; -- Given an element of a Stable_Properties aspect spec, return the -- associated entity. - -- This function updates the Negated flag as a side-effect. + -- This function updates the Negated flag as a side effect. -------------------- -- Extract_Entity -- diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb index 4f2521a1dfb..8ee75783d48 100644 --- a/gcc/ada/sem_ch6.adb +++ b/gcc/ada/sem_ch6.adb @@ -4612,7 +4612,7 @@ package body Sem_Ch6 is Analyze_SPARK_Subprogram_Specification (Specification (N)); - -- A function with side-effects shall not be an expression function + -- A function with side effects shall not be an expression function -- (SPARK RM 6.1.11(6)). if Present (Spec_Id) @@ -5240,7 +5240,7 @@ package body Sem_Ch6 is Analyze_Aspect_Specifications (N, Designator); -- The legality of a function specification in SPARK depends on whether - -- the function is a function with or without side-effects. Analyze the + -- the function is a function with or without side effects. Analyze the -- pragma in advance if present, before specific SPARK legality checks. Analyze_Pragmas_If_Present (N, Pragma_SPARK_Mode); diff --git a/gcc/ada/sem_ch8.adb b/gcc/ada/sem_ch8.adb index d231910cb95..c5bf0864671 100644 --- a/gcc/ada/sem_ch8.adb +++ b/gcc/ada/sem_ch8.adb @@ -2691,7 +2691,7 @@ package body Sem_Ch8 is -- Each attempt to find a suitable primitive of a particular -- type operates on its own copy of the original renaming. -- As a result the original renaming is kept decoration and - -- side-effect free. + -- side-effect-free. -- Inherit the overloaded status of the renamed subprogram name diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index c49cb278c59..02f6f29c8a8 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -13425,7 +13425,7 @@ package body Sem_Prag is Analyze_If_Present (Pragma_Side_Effects); -- Pragma Always_Terminates is not allowed on functions without - -- side-effects. + -- side effects. if Ekind (Spec_Id) in E_Function | E_Generic_Function and then not Is_Function_With_Side_Effects (Spec_Id) @@ -16989,7 +16989,7 @@ package body Sem_Prag is Analyze_If_Present (Pragma_Side_Effects); -- Pragma Exceptional_Cases is not allowed on functions without - -- side-effects. + -- side effects. if Ekind (Spec_Id) in E_Function | E_Generic_Function and then not Is_Function_With_Side_Effects (Spec_Id) @@ -23072,7 +23072,7 @@ package body Sem_Prag is Analyze_If_Present (Pragma_Side_Effects); - -- A function with side-effects shall not have a Pure_Function + -- A function with side effects shall not have a Pure_Function -- aspect or pragma (SPARK RM 6.1.11(5)). if Is_Function_With_Side_Effects (E) then @@ -23949,8 +23949,8 @@ package body Sem_Prag is Add_Contract_Item (N, Spec_Id); - -- A function with side-effects cannot override a function without - -- side-effects (SPARK RM 7.1.2(16)). Overriding checks are + -- A function with side effects cannot override a function without + -- side effects (SPARK RM 7.1.2(16)). Overriding checks are -- usually performed in New_Overloaded_Entity, however at -- that point the pragma has not been processed yet. @@ -23960,7 +23960,7 @@ package body Sem_Prag is and then not Is_Function_With_Side_Effects (Over_Id) then Error_Msg_N - ("incompatible declaration of side-effects for function", + ("incompatible declaration of side effects for function", Spec_Id); Error_Msg_Sloc := Sloc (Over_Id); diff --git a/gcc/ada/sem_util.ads b/gcc/ada/sem_util.ads index 96b4730f4af..2fae35b6bc4 100644 --- a/gcc/ada/sem_util.ads +++ b/gcc/ada/sem_util.ads @@ -1480,7 +1480,7 @@ package Sem_Util is -- Is the given expression a container aggregate? function Is_Function_With_Side_Effects (Subp : Entity_Id) return Boolean; - -- Return True if Subp is a function with side-effects, ie. it has a + -- Return True if Subp is a function with side effects, ie. it has a -- (direct or inherited) pragma Side_Effects with static value True. function Is_Newly_Constructed