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 --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.
 


Reply via email to