diff mbox series

[Ada] Remove dead code for overlapping actuals and prefix notation

Message ID 20210617143310.GA9663@adacore.com
State New
Headers show
Series [Ada] Remove dead code for overlapping actuals and prefix notation | expand

Commit Message

Pierre-Marie de Rodat June 17, 2021, 2:33 p.m. UTC
In detection of overlapping actuals we first call Refer_Same_Object to
filter function calls that act as actual parameters. There is no need to
later special-case any function calls, e.g. in the prefix notation.

Tested on x86_64-pc-linux-gnu, committed on trunk

gcc/ada/

	* sem_warn.adb (Warn_On_Overlapping_Actuals): Remove dead code.
diff mbox series

Patch

diff --git a/gcc/ada/sem_warn.adb b/gcc/ada/sem_warn.adb
--- a/gcc/ada/sem_warn.adb
+++ b/gcc/ada/sem_warn.adb
@@ -3788,12 +3788,6 @@  package body Sem_Warn is
                   then
                      null;
 
-                  --  If the actual is a function call in prefix notation,
-                  --  there is no real overlap.
-
-                  elsif Nkind (Act2) = N_Function_Call then
-                     null;
-
                   --  If type is explicitly not by-copy, assume that
                   --  aliasing is intended.