From: Piotr Trojanek Date: Wed, 1 Dec 2021 14:30:46 +0000 (+0100) Subject: [Ada] Remove unnecessary check for missing parameter specifications X-Git-Tag: basepoints/gcc-13~2078 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1702fb6bf95de5461f896cf69832edc0e2e40cc5;p=thirdparty%2Fgcc.git [Ada] Remove unnecessary check for missing parameter specifications gcc/ada/ * exp_disp.adb (Gen_Parameters_Profile): Remove redundant guard. --- diff --git a/gcc/ada/exp_disp.adb b/gcc/ada/exp_disp.adb index de2ba7a562b0..c8e2ade817c2 100644 --- a/gcc/ada/exp_disp.adb +++ b/gcc/ada/exp_disp.adb @@ -8065,19 +8065,17 @@ package body Exp_Disp is Out_Present => True, Parameter_Type => New_Occurrence_Of (Typ, Loc))); - if Present (Parameter_Specifications (Parent (E))) then - P := First (Parameter_Specifications (Parent (E))); - while Present (P) loop - Append_To (Parms, - Make_Parameter_Specification (Loc, - Defining_Identifier => - Make_Defining_Identifier (Loc, - Chars => Chars (Defining_Identifier (P))), - Parameter_Type => New_Copy_Tree (Parameter_Type (P)), - Expression => New_Copy_Tree (Expression (P)))); - Next (P); - end loop; - end if; + P := First (Parameter_Specifications (Parent (E))); + while Present (P) loop + Append_To (Parms, + Make_Parameter_Specification (Loc, + Defining_Identifier => + Make_Defining_Identifier (Loc, + Chars => Chars (Defining_Identifier (P))), + Parameter_Type => New_Copy_Tree (Parameter_Type (P)), + Expression => New_Copy_Tree (Expression (P)))); + Next (P); + end loop; return Parms; end Gen_Parameters_Profile;