diff options
author | Piotr Trojanek <trojanek@adacore.com> | 2021-03-15 14:53:29 +0100 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2021-06-18 04:36:48 -0400 |
commit | 9c2886684f8263f5f63b15f358ce33bfc67d27ce (patch) | |
tree | ecfc906c21fd4433712e90b03c144481d7e595d8 | |
parent | 2a8dbd6b244df31819c378626007c45f001f7136 (diff) | |
download | gcc-9c2886684f8263f5f63b15f358ce33bfc67d27ce.zip gcc-9c2886684f8263f5f63b15f358ce33bfc67d27ce.tar.gz gcc-9c2886684f8263f5f63b15f358ce33bfc67d27ce.tar.bz2 |
[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.
-rw-r--r-- | gcc/ada/sem_warn.adb | 42 |
1 files changed, 6 insertions, 36 deletions
diff --git a/gcc/ada/sem_warn.adb b/gcc/ada/sem_warn.adb index e85f493..d612d53 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; |