From cd9300765e7e3fd43e450777e98a778146f700c2 Mon Sep 17 00:00:00 2001 From: gingold Date: Sat, 30 Aug 2008 13:30:19 +0000 Subject: Switch to gcc 4.3 Don't use tagged types in grt (not supported by recent versions of GNAT) Fix warnings --- sem_types.adb | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) (limited to 'sem_types.adb') diff --git a/sem_types.adb b/sem_types.adb index 777a245e7..efd14801e 100644 --- a/sem_types.adb +++ b/sem_types.adb @@ -1062,6 +1062,7 @@ package body Sem_Types is Res: Iir; El : Iir; List : Iir_List; + Has_Error : Boolean; begin Name := Get_Resolution_Function (Decl); if Name = Null_Iir then @@ -1086,19 +1087,29 @@ package body Sem_Types is if Is_Overload_List (Func) then List := Get_Overload_List (Func); + Has_Error := False; for I in Natural loop El := Get_Nth_Element (List, I); exit when El = Null_Iir; if Is_A_Resolution_Function (El, Decl) then - if Func /= Null_Iir then - Error_Msg_Sem - ("can't resolve overload for resolution function", Decl); - return; + if Res /= Null_Iir then + if not Has_Error then + Has_Error := True; + Error_Msg_Sem + ("can't resolve overload for resolution function", + Decl); + Error_Msg_Sem ("candidate functions are:", Decl); + Error_Msg_Sem (" " & Disp_Subprg (Func), Func); + end if; + Error_Msg_Sem (" " & Disp_Subprg (El), El); else - Func := El; + Res := El; end if; end if; end loop; + if Has_Error then + return; + end if; else if Is_A_Resolution_Function (Func, Decl) then Res := Func; @@ -1478,6 +1489,7 @@ package body Sem_Types is -- constraint. declare Sub_Type : Iir; + pragma Unreferenced (Sub_Type); Base_Type : Iir; begin Base_Type := Get_Designated_Type (Type_Mark); -- cgit v1.2.3