aboutsummaryrefslogtreecommitdiffstats
path: root/src/errorout.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2023-01-11 19:21:43 +0100
committerTristan Gingold <tgingold@free.fr>2023-01-12 05:54:20 +0100
commitfe3810861d6359f4a7c27b295b03f46e3941199a (patch)
treebfccabbbea8327e512d6823f288b031192ab4190 /src/errorout.adb
parentbad2f273cc5e35dd6ff2d1a5f4458291051d6b5f (diff)
downloadghdl-fe3810861d6359f4a7c27b295b03f46e3941199a.tar.gz
ghdl-fe3810861d6359f4a7c27b295b03f46e3941199a.tar.bz2
ghdl-fe3810861d6359f4a7c27b295b03f46e3941199a.zip
synth: report values in bound errors
Diffstat (limited to 'src/errorout.adb')
-rw-r--r--src/errorout.adb18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/errorout.adb b/src/errorout.adb
index 4f0746fcb..39d4af782 100644
--- a/src/errorout.adb
+++ b/src/errorout.adb
@@ -214,6 +214,18 @@ package body Errorout is
Report_Handler.Message (S (2 .. S'Last));
end Output_Uns32;
+ procedure Output_Int32 (V : Int32)
+ is
+ S : constant String := Int32'Image (V);
+ F : Positive;
+ begin
+ F := 1;
+ if S (F) = ' ' then
+ F := 2;
+ end if;
+ Report_Handler.Message (S (F .. S'Last));
+ end Output_Int32;
+
procedure Output_String8 (Str : String8_Len_Type) is
begin
Report_Handler.Message ("""");
@@ -348,7 +360,11 @@ package body Errorout is
raise Internal_Error;
end if;
when Earg_Int32 =>
- raise Internal_Error;
+ if Format = 'v' then
+ Output_Int32 (Arg.Val_Int32);
+ else
+ raise Internal_Error;
+ end if;
when Earg_Lang_Kind =>
if Lang_Handlers (Arg.Kind) = null then
raise Internal_Error;