diff options
author | cderrien <65495526+cderrien@users.noreply.github.com> | 2022-11-08 08:02:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-08 08:02:39 +0100 |
commit | 33b400ad884ee8f9a9c01c3d47968eea7dcd3db2 (patch) | |
tree | 234d519d805d8cedc005df757b9b925301a47876 /src/synth | |
parent | 640e4c13fc8bd1fd7a0bfddddf7c851b2b171135 (diff) | |
download | ghdl-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.adb | 8 | ||||
-rw-r--r-- | src/synth/synth-errors.ads | 4 | ||||
-rw-r--r-- | src/synth/synth-vhdl_decls.adb | 4 | ||||
-rw-r--r-- | src/synth/synth-vhdl_stmts.adb | 6 |
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; |