aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2015-05-21 07:01:59 +0200
committerTristan Gingold <tgingold@free.fr>2015-05-21 07:01:59 +0200
commit6b46ffa0752e8c84a06a0321add21b37041a3131 (patch)
treeeab397425d7097c2e3e45c0f799d3118061ea9b7 /src
parent4f86c7d4b92d4821b11396c4ff7c9fa5b818c6a7 (diff)
downloadghdl-6b46ffa0752e8c84a06a0321add21b37041a3131.tar.gz
ghdl-6b46ffa0752e8c84a06a0321add21b37041a3131.tar.bz2
ghdl-6b46ffa0752e8c84a06a0321add21b37041a3131.zip
Fix location output in elab error messages.
Diffstat (limited to 'src')
-rw-r--r--src/vhdl/errorout.adb17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/vhdl/errorout.adb b/src/vhdl/errorout.adb
index ac2c3cefb..7928b7485 100644
--- a/src/vhdl/errorout.adb
+++ b/src/vhdl/errorout.adb
@@ -118,6 +118,12 @@ package body Errorout is
end if;
end Disp_Location;
+ procedure Disp_Program_Name is
+ begin
+ Put (Ada.Command_Line.Command_Name);
+ Put (':');
+ end Disp_Program_Name;
+
procedure Report_Msg (Level : Report_Level;
Origin : Report_Origin;
Loc : Location_Type;
@@ -126,7 +132,13 @@ package body Errorout is
case Origin is
when Option
| Library =>
- Put (Ada.Command_Line.Command_Name);
+ Disp_Program_Name;
+ when Elaboration =>
+ if Loc = No_Location then
+ Disp_Program_Name;
+ else
+ Disp_Location (Loc);
+ end if;
when Scan =>
if Loc = No_Location then
Disp_Current_Location;
@@ -139,8 +151,7 @@ package body Errorout is
else
Disp_Location (Loc);
end if;
- when Semantic
- | Elaboration =>
+ when Semantic =>
Disp_Location (Loc);
end case;