A local variable Param_Count is only accessed after being initialized to
1 and then is only incremented, so it only takes positive values. There
is no complex control flow involved, so code checkers like CodePeer
should have no trouble with the new code.

Semantics is unaffected.

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

gcc/ada/

        * exp_ch6.adb (Expand_Call_Helper): Cleanup.
diff --git a/gcc/ada/exp_ch6.adb b/gcc/ada/exp_ch6.adb
--- a/gcc/ada/exp_ch6.adb
+++ b/gcc/ada/exp_ch6.adb
@@ -3259,7 +3259,7 @@ package body Exp_Ch6 is
       Actual        : Node_Id;
       Formal        : Entity_Id;
       Orig_Subp     : Entity_Id := Empty;
-      Param_Count   : Natural := 0;
+      Param_Count   : Positive;
       Parent_Formal : Entity_Id;
       Parent_Subp   : Entity_Id;
       Prev_Ult      : Node_Id;


Reply via email to