From 6b0d16f7dd1c25119d7b4fad7cff5d3a24bd269a Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Fri, 20 Jun 2025 10:15:34 -0500 Subject: [PATCH] testsuites/benchmarks/dhrystone/*: Eliminate old-style prototypes GCC 15 is noisy about these. They have been deprecated since C90 but still lurk. Updates #5275 --- testsuites/benchmarks/dhrystone/dhry_1.c | 11 ++----- testsuites/benchmarks/dhrystone/dhry_2.c | 37 ++++++++++-------------- 2 files changed, 18 insertions(+), 30 deletions(-) diff --git a/testsuites/benchmarks/dhrystone/dhry_1.c b/testsuites/benchmarks/dhrystone/dhry_1.c index ef6ecf9251..5e89e2438d 100644 --- a/testsuites/benchmarks/dhrystone/dhry_1.c +++ b/testsuites/benchmarks/dhrystone/dhry_1.c @@ -294,10 +294,8 @@ execution_start: } -void Proc_1 (Ptr_Val_Par) +void Proc_1 ( REG Rec_Pointer Ptr_Val_Par ) /******************/ - -REG Rec_Pointer Ptr_Val_Par; /* executed once */ { REG Rec_Pointer Next_Record = Ptr_Val_Par->Ptr_Comp; @@ -328,12 +326,10 @@ REG Rec_Pointer Ptr_Val_Par; } /* Proc_1 */ -void Proc_2 (Int_Par_Ref) +void Proc_2 ( One_Fifty *Int_Par_Ref ) /******************/ /* executed once */ /* *Int_Par_Ref == 1, becomes 4 */ - -One_Fifty *Int_Par_Ref; { One_Fifty Int_Loc; Enumeration Enum_Loc; @@ -351,12 +347,11 @@ One_Fifty *Int_Par_Ref; } /* Proc_2 */ -void Proc_3 (Ptr_Ref_Par) +void Proc_3 ( Rec_Pointer *Ptr_Ref_Par ) /******************/ /* executed once */ /* Ptr_Ref_Par becomes Ptr_Glob */ -Rec_Pointer *Ptr_Ref_Par; { if (Ptr_Glob != Null) diff --git a/testsuites/benchmarks/dhrystone/dhry_2.c b/testsuites/benchmarks/dhrystone/dhry_2.c index 94a72eb487..0192cd5d5a 100644 --- a/testsuites/benchmarks/dhrystone/dhry_2.c +++ b/testsuites/benchmarks/dhrystone/dhry_2.c @@ -29,13 +29,12 @@ extern int Int_Glob; extern char Ch_1_Glob; -void Proc_6 (Enum_Val_Par, Enum_Ref_Par) +void Proc_6 ( + Enumeration Enum_Val_Par, + Enumeration *Enum_Ref_Par) /*********************************/ /* executed once */ /* Enum_Val_Par == Ident_3, Enum_Ref_Par becomes Ident_2 */ - -Enumeration Enum_Val_Par; -Enumeration *Enum_Ref_Par; { *Enum_Ref_Par = Enum_Val_Par; if (! Func_3 (Enum_Val_Par)) @@ -63,7 +62,10 @@ Enumeration *Enum_Ref_Par; } /* Proc_6 */ -void Proc_7 (Int_1_Par_Val, Int_2_Par_Val, Int_Par_Ref) +void Proc_7 ( + One_Fifty Int_1_Par_Val, + One_Fifty Int_2_Par_Val, + One_Fifty *Int_Par_Ref) /**********************************************/ /* executed three times */ /* first call: Int_1_Par_Val == 2, Int_2_Par_Val == 3, */ @@ -72,9 +74,6 @@ void Proc_7 (Int_1_Par_Val, Int_2_Par_Val, Int_Par_Ref) /* Int_Par_Ref becomes 17 */ /* third call: Int_1_Par_Val == 6, Int_2_Par_Val == 10, */ /* Int_Par_Ref becomes 18 */ -One_Fifty Int_1_Par_Val; -One_Fifty Int_2_Par_Val; -One_Fifty *Int_Par_Ref; { One_Fifty Int_Loc; @@ -83,15 +82,15 @@ One_Fifty *Int_Par_Ref; } /* Proc_7 */ -void Proc_8 (Arr_1_Par_Ref, Arr_2_Par_Ref, Int_1_Par_Val, Int_2_Par_Val) +void Proc_8 ( + Arr_1_Dim Arr_1_Par_Ref, + Arr_2_Dim Arr_2_Par_Ref, + int Int_1_Par_Val, + int Int_2_Par_Val) /*********************************************************************/ /* executed once */ /* Int_Par_Val_1 == 3 */ /* Int_Par_Val_2 == 7 */ -Arr_1_Dim Arr_1_Par_Ref; -Arr_2_Dim Arr_2_Par_Ref; -int Int_1_Par_Val; -int Int_2_Par_Val; { REG One_Fifty Int_Index; REG One_Fifty Int_Loc; @@ -108,15 +107,12 @@ int Int_2_Par_Val; } /* Proc_8 */ -Enumeration Func_1 (Ch_1_Par_Val, Ch_2_Par_Val) +Enumeration Func_1 ( Capital_Letter Ch_1_Par_Val, Capital_Letter Ch_2_Par_Val ) /*************************************************/ /* executed three times */ /* first call: Ch_1_Par_Val == 'H', Ch_2_Par_Val == 'R' */ /* second call: Ch_1_Par_Val == 'A', Ch_2_Par_Val == 'C' */ /* third call: Ch_1_Par_Val == 'B', Ch_2_Par_Val == 'C' */ - -Capital_Letter Ch_1_Par_Val; -Capital_Letter Ch_2_Par_Val; { Capital_Letter Ch_1_Loc; Capital_Letter Ch_2_Loc; @@ -134,14 +130,12 @@ Capital_Letter Ch_2_Par_Val; } /* Func_1 */ -Boolean Func_2 (Str_1_Par_Ref, Str_2_Par_Ref) +Boolean Func_2 ( Str_30 Str_1_Par_Ref, Str_30 Str_2_Par_Ref ) /*************************************************/ /* executed once */ /* Str_1_Par_Ref == "DHRYSTONE PROGRAM, 1'ST STRING" */ /* Str_2_Par_Ref == "DHRYSTONE PROGRAM, 2'ND STRING" */ -Str_30 Str_1_Par_Ref; -Str_30 Str_2_Par_Ref; { REG One_Thirty Int_Loc; Capital_Letter Ch_Loc; @@ -176,11 +170,10 @@ Str_30 Str_2_Par_Ref; } /* Func_2 */ -Boolean Func_3 (Enum_Par_Val) +Boolean Func_3 ( Enumeration Enum_Par_Val ) /***************************/ /* executed once */ /* Enum_Par_Val == Ident_3 */ -Enumeration Enum_Par_Val; { Enumeration Enum_Loc;