From: Pierre-Marie de Rodat <derodat@adacore.com>
To: gcc-patches@gcc.gnu.org
Cc: Piotr Trojanek <trojanek@adacore.com>
Subject: [Ada] Fix comment about expansion of slices
Date: Mon, 4 Oct 2021 08:48:03 +0000 [thread overview]
Message-ID: <20211004084803.GA1536869@adacore.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 286 bytes --]
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.
[-- Attachment #2: patch.diff --]
[-- Type: text/x-diff, Size: 2001 bytes --]
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;
reply other threads:[~2021-10-04 8:48 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211004084803.GA1536869@adacore.com \
--to=derodat@adacore.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=trojanek@adacore.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).