aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth
diff options
context:
space:
mode:
authorcderrien <65495526+cderrien@users.noreply.github.com>2022-11-08 08:02:39 +0100
committerGitHub <noreply@github.com>2022-11-08 08:02:39 +0100
commit33b400ad884ee8f9a9c01c3d47968eea7dcd3db2 (patch)
tree234d519d805d8cedc005df757b9b925301a47876 /src/synth
parent640e4c13fc8bd1fd7a0bfddddf7c851b2b171135 (diff)
downloadghdl-33b400ad884ee8f9a9c01c3d47968eea7dcd3db2.tar.gz
ghdl-33b400ad884ee8f9a9c01c3d47968eea7dcd3db2.tar.bz2
ghdl-33b400ad884ee8f9a9c01c3d47968eea7dcd3db2.zip
Added id to warnings related to attributes. (#2242)
Diffstat (limited to 'src/synth')
-rw-r--r--src/synth/synth-errors.adb8
-rw-r--r--src/synth/synth-errors.ads4
-rw-r--r--src/synth/synth-vhdl_decls.adb4
-rw-r--r--src/synth/synth-vhdl_stmts.adb6
4 files changed, 20 insertions, 2 deletions
diff --git a/src/synth/synth-errors.adb b/src/synth/synth-errors.adb
index 795c0e1c4..dfccaf158 100644
--- a/src/synth/synth-errors.adb
+++ b/src/synth/synth-errors.adb
@@ -61,6 +61,14 @@ package body Synth.Errors is
begin
Report_Msg (Warnid, Errorout.Elaboration, +Loc, Msg, (1 => Arg1));
end Warning_Msg_Synth;
+
+ procedure Warning_Msg_Synth (Warnid : Msgid_Warnings;
+ Loc : Location_Type;
+ Msg : String;
+ Args : Earg_Arr := No_Eargs) is
+ begin
+ Report_Msg (Warnid, Errorout.Elaboration, +Loc, Msg, Args);
+ end Warning_Msg_Synth;
procedure Warning_Msg_Synth (Loc : Location_Type;
Msg : String;
diff --git a/src/synth/synth-errors.ads b/src/synth/synth-errors.ads
index c238d7575..8b505587d 100644
--- a/src/synth/synth-errors.ads
+++ b/src/synth/synth-errors.ads
@@ -43,6 +43,10 @@ package Synth.Errors is
Loc : Location_Type;
Msg : String;
Arg1 : Earg_Type);
+ procedure Warning_Msg_Synth (Warnid : Msgid_Warnings;
+ Loc : Location_Type;
+ Msg : String;
+ Args : Earg_Arr := No_Eargs);
procedure Warning_Msg_Synth (Loc : Location_Type;
Msg : String;
Args : Earg_Arr := No_Eargs);
diff --git a/src/synth/synth-vhdl_decls.adb b/src/synth/synth-vhdl_decls.adb
index 7732e47ec..de10c01b6 100644
--- a/src/synth/synth-vhdl_decls.adb
+++ b/src/synth/synth-vhdl_decls.adb
@@ -257,7 +257,9 @@ package body Synth.Vhdl_Decls is
-- TODO: components ?
-- TODO: Interface_Signal ? But no instance for them.
Warning_Msg_Synth
- (+Attr_Value, "attribute %i for %n is not kept in the netlist",
+ (Warnid_Unkept_Attribute,
+ +Attr_Value,
+ "attribute %i for %n is not kept in the netlist",
(+Attr_Decl, +Obj));
return;
end case;
diff --git a/src/synth/synth-vhdl_stmts.adb b/src/synth/synth-vhdl_stmts.adb
index 54936e140..18525a4b6 100644
--- a/src/synth/synth-vhdl_stmts.adb
+++ b/src/synth/synth-vhdl_stmts.adb
@@ -4616,7 +4616,11 @@ package body Synth.Vhdl_Stmts is
-- Applies to nets/ports.
null;
when others =>
- Warning_Msg_Synth (+Spec, "unhandled attribute %i", (1 => +Id));
+ Warning_Msg_Synth
+ (Warnid_Unhandled_Attribute,
+ +Spec,
+ "unhandled attribute %i",
+ (1 => +Id));
end case;
Val := Get_Value_Chain (Val);
end loop;