aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-03-06 08:01:53 +0100
committerTristan Gingold <tgingold@free.fr>2020-03-06 08:01:53 +0100
commit0e4a4280f05604821c1c7719b3d9486bf11af5ce (patch)
treed9b95d80c15b7181bb4b8b3d99256bccb5566366 /src/vhdl
parent8aa863512adaba4d6394f7bfd1f37198d0d96f1b (diff)
downloadghdl-0e4a4280f05604821c1c7719b3d9486bf11af5ce.tar.gz
ghdl-0e4a4280f05604821c1c7719b3d9486bf11af5ce.tar.bz2
ghdl-0e4a4280f05604821c1c7719b3d9486bf11af5ce.zip
vhdl-errors: give an hint for -frelaxed. Fix #1152
Diffstat (limited to 'src/vhdl')
-rw-r--r--src/vhdl/vhdl-errors.adb10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/vhdl/vhdl-errors.adb b/src/vhdl/vhdl-errors.adb
index c05fa3265..313326c0f 100644
--- a/src/vhdl/vhdl-errors.adb
+++ b/src/vhdl/vhdl-errors.adb
@@ -110,6 +110,8 @@ package body Vhdl.Errors is
Report_Msg (Msgid_Error, Semantic, +Loc, Msg, (1 => Arg1));
end Error_Msg_Sem;
+ Relaxed_Hint_Done : Boolean := False;
+
procedure Error_Msg_Relaxed (Origin : Report_Origin;
Id : Msgid_Warnings;
Msg : String;
@@ -127,6 +129,14 @@ package body Vhdl.Errors is
Level := Msgid_Error;
end if;
Report_Msg (Level, Origin, +Loc, Msg, Args);
+ if not Relaxed_Hint_Done and then Level = Msgid_Error then
+ Report_Msg
+ (Msgid_Note, Origin, +Loc,
+ "(you can use -frelaxed to turn this error into a warning)");
+ -- Emit the message only once, although it applies for many error.
+ -- Maybe do it once per Id ?
+ Relaxed_Hint_Done := True;
+ end if;
end Error_Msg_Relaxed;
procedure Error_Msg_Sem_Relaxed (Loc : Iir;