diff options
author | Xiretza <xiretza@xiretza.xyz> | 2022-02-27 11:17:22 +0100 |
---|---|---|
committer | tgingold <tgingold@users.noreply.github.com> | 2022-03-01 07:27:38 +0100 |
commit | eee920287976b0be046dc7a99551d07c96c5a1a3 (patch) | |
tree | 3a8583355dd8e33f36f492c4662936d2f599d74b /src/vhdl | |
parent | 723a80c63b362ffb988ce08abc9a6d10f5a22cea (diff) | |
download | ghdl-eee920287976b0be046dc7a99551d07c96c5a1a3.tar.gz ghdl-eee920287976b0be046dc7a99551d07c96c5a1a3.tar.bz2 ghdl-eee920287976b0be046dc7a99551d07c96c5a1a3.zip |
vhdl-sem_types: allow file and protected type access types in -2019
This implements LCS-2016-014a:
http://www.eda-twiki.org/cgi-bin/view.cgi/P1076/LCS2016_014a
Diffstat (limited to 'src/vhdl')
-rw-r--r-- | src/vhdl/vhdl-sem_types.adb | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/src/vhdl/vhdl-sem_types.adb b/src/vhdl/vhdl-sem_types.adb index 83da696d1..8cde6ea00 100644 --- a/src/vhdl/vhdl-sem_types.adb +++ b/src/vhdl/vhdl-sem_types.adb @@ -1131,14 +1131,19 @@ package body Vhdl.Sem_Types is (Def, Get_Incomplete_Type_Ref_Chain (D_Type)); Set_Incomplete_Type_Ref_Chain (D_Type, Def); when Iir_Kind_File_Type_Definition => - -- LRM 3.3 - -- The designated type must not be a file type. - Error_Msg_Sem (+Def, "designated type must not be a file type"); + if Vhdl_Std < Vhdl_19 then + -- LRM 3.3 + -- The designated type must not be a file type. + Error_Msg_Sem + (+Def, "designated type must not be a file type"); + end if; when Iir_Kind_Protected_Type_Declaration => - -- LRM02 3.3 - -- [..] or a protected type. - Error_Msg_Sem - (+Def, "designated type must not be a protected type"); + if Vhdl_Std < Vhdl_19 then + -- LRM02 3.3 + -- [..] or a protected type. + Error_Msg_Sem + (+Def, "designated type must not be a protected type"); + end if; when others => null; end case; |