diff options
author | Tristan Gingold <tgingold@free.fr> | 2017-02-06 08:35:41 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2017-02-06 08:35:41 +0100 |
commit | db4b46e5c5c5f98ccba37fc18a9ac48a0cba0ff5 (patch) | |
tree | 93558687cf658638e3e154aad8f6c0871a8786bc /src/vhdl/sem_decls.adb | |
parent | e27f10a33792285471c66dd2b5f97bc47a93efc9 (diff) | |
download | ghdl-db4b46e5c5c5f98ccba37fc18a9ac48a0cba0ff5.tar.gz ghdl-db4b46e5c5c5f98ccba37fc18a9ac48a0cba0ff5.tar.bz2 ghdl-db4b46e5c5c5f98ccba37fc18a9ac48a0cba0ff5.zip |
Add color diagnostics, show diagnostic option.
Diffstat (limited to 'src/vhdl/sem_decls.adb')
-rw-r--r-- | src/vhdl/sem_decls.adb | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/vhdl/sem_decls.adb b/src/vhdl/sem_decls.adb index d39d0a978..122bcf17e 100644 --- a/src/vhdl/sem_decls.adb +++ b/src/vhdl/sem_decls.adb @@ -1938,19 +1938,16 @@ package body Sem_Decls is -- parse. if Flags.Vhdl_Std >= Vhdl_00 then declare - Base_Type : Iir; - Is_Protected : Boolean; - begin - Base_Type := Get_Base_Type (Atype); - Is_Protected := + Base_Type : constant Iir := Get_Base_Type (Atype); + Is_Protected : constant Boolean := Get_Kind (Base_Type) = Iir_Kind_Protected_Type_Declaration; - + begin -- LRM00 4.3.1.3 -- The base type of the subtype indication of a -- shared variable declaration must be a protected type. if Get_Shared_Flag (Decl) and not Is_Protected then Error_Msg_Sem_Relaxed - (Decl, + (Decl, Warnid_Shared, "type of a shared variable must be a protected type"); end if; @@ -2099,7 +2096,8 @@ package body Sem_Decls is Spec := Get_Subprogram_Specification (Parent); if Get_Pure_Flag (Spec) then Error_Msg_Sem_Relaxed - (Decl, "cannot declare a file in a pure function"); + (Decl, Warnid_Pure, + "cannot declare a file in a pure function"); end if; when Iir_Kind_Procedure_Body => Spec := Get_Subprogram_Specification (Parent); |