public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-1618] [Ada] Remove dead code for overlapping actuals in prefix notation
@ 2021-06-18 8:38 Pierre-Marie de Rodat
0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2021-06-18 8:38 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:9c2886684f8263f5f63b15f358ce33bfc67d27ce
commit r12-1618-g9c2886684f8263f5f63b15f358ce33bfc67d27ce
Author: Piotr Trojanek <trojanek@adacore.com>
Date: Mon Mar 15 14:53:29 2021 +0100
[Ada] Remove dead code for overlapping actuals in prefix notation
gcc/ada/
* sem_warn.adb (Warn_On_Overlapping_Actuals): Remove dead branch
for overlapping actuals in prefix notation.
Diff:
---
gcc/ada/sem_warn.adb | 42 ++++++------------------------------------
1 file changed, 6 insertions(+), 36 deletions(-)
diff --git a/gcc/ada/sem_warn.adb b/gcc/ada/sem_warn.adb
index e85f4930175..d612d53dbea 100644
--- a/gcc/ada/sem_warn.adb
+++ b/gcc/ada/sem_warn.adb
@@ -3839,45 +3839,15 @@ package body Sem_Warn is
or else Error_To_Warning;
- -- If the call was written in prefix notation, and thus
- -- its prefix before rewriting was a selected component,
- -- count only visible actuals in call.
-
- if Is_Entity_Name (First_Actual (N))
- and then Nkind (Original_Node (N)) = Nkind (N)
- and then Nkind (Name (Original_Node (N))) =
- N_Selected_Component
- and then
- Is_Entity_Name (Prefix (Name (Original_Node (N))))
- and then
- Entity (Prefix (Name (Original_Node (N)))) =
- Entity (First_Actual (N))
- then
- if Act1 = First_Actual (N) then
- Error_Msg_FE
- ("<I<`IN OUT` prefix overlaps with "
- & "actual for&", Act1, Form2);
-
- else
- -- For greater clarity, give name of formal
-
- Error_Msg_Node_2 := Form2;
- Error_Msg_FE
- ("<I<writable actual for & overlaps with "
- & "actual for&", Act1, Form2);
- end if;
-
- else
- -- For greater clarity, give name of formal
+ -- For greater clarity, give name of formal
- Error_Msg_Node_2 := Form2;
+ Error_Msg_Node_2 := Form2;
- -- This is one of the messages
+ -- This is one of the messages
- Error_Msg_FE
- ("<I<writable actual for & overlaps with "
- & "actual for&", Act1, Form1);
- end if;
+ Error_Msg_FE
+ ("<I<writable actual for & overlaps with actual for &",
+ Act1, Form1);
end if;
end if;
end if;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-06-18 8:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-18 8:38 [gcc r12-1618] [Ada] Remove dead code for overlapping actuals in prefix notation Pierre-Marie de Rodat
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).