From: Yannick Moy Date: Fri, 3 May 2024 13:02:39 +0000 (+0200) Subject: ada: Fix test for giving hint on ambiguous aggregate X-Git-Tag: basepoints/gcc-16~8269 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=36c59b3a689a929e8c786cc4614fad923658b3c4;p=thirdparty%2Fgcc.git ada: Fix test for giving hint on ambiguous aggregate In the case the type of an aggregate cannot be determined due to an ambiguity, caused by the existence of container aggregates, a hint can be given by GNAT. The test for giving this hint should be the Ada language version, not the fact that extensions are allowed. Now fixed. There is no impact on code generation. gcc/ada/ * sem_util.adb (Check_Ambiguous_Aggregate): Fix test. --- diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index e8120c2adda..3d12f552f41 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -2387,7 +2387,7 @@ package body Sem_Util is Actual : Node_Id; begin - if All_Extensions_Allowed then + if Ada_Version >= Ada_2022 then Actual := First_Actual (Call); while Present (Actual) loop if Nkind (Actual) = N_Aggregate then