aboutsummaryrefslogtreecommitdiffstats
path: root/sem_types.adb
diff options
context:
space:
mode:
authorgingold <gingold@b72b5c32-5f01-0410-b925-b5c7b92870f7>2008-08-30 13:30:19 +0000
committergingold <gingold@b72b5c32-5f01-0410-b925-b5c7b92870f7>2008-08-30 13:30:19 +0000
commitcd9300765e7e3fd43e450777e98a778146f700c2 (patch)
treef013fea17ae4eee9c1649e63b99b9bfe377fafb4 /sem_types.adb
parent4b6571671497ecc1f846bfa49678254e14511fc9 (diff)
downloadghdl-cd9300765e7e3fd43e450777e98a778146f700c2.tar.gz
ghdl-cd9300765e7e3fd43e450777e98a778146f700c2.tar.bz2
ghdl-cd9300765e7e3fd43e450777e98a778146f700c2.zip
Switch to gcc 4.3
Don't use tagged types in grt (not supported by recent versions of GNAT) Fix warnings
Diffstat (limited to 'sem_types.adb')
-rw-r--r--sem_types.adb22
1 files changed, 17 insertions, 5 deletions
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);