diff options
author | Tristan Gingold <tgingold@free.fr> | 2014-07-01 05:43:37 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2014-07-01 05:43:37 +0200 |
commit | 1bc00453a725214de4964add2b7f8423d1a5d2da (patch) | |
tree | 107a1468eb9c2a825c8d91627808fbc4e0455fe6 /sem_decls.adb | |
parent | d6f65268ff859a80667978af2d4f4f1623ff6c66 (diff) | |
download | ghdl-1bc00453a725214de4964add2b7f8423d1a5d2da.tar.gz ghdl-1bc00453a725214de4964add2b7f8423d1a5d2da.tar.bz2 ghdl-1bc00453a725214de4964add2b7f8423d1a5d2da.zip |
vhdl08: add oread, hread.
Diffstat (limited to 'sem_decls.adb')
-rw-r--r-- | sem_decls.adb | 39 |
1 files changed, 19 insertions, 20 deletions
diff --git a/sem_decls.adb b/sem_decls.adb index 1f96fb756..a878cbe8b 100644 --- a/sem_decls.adb +++ b/sem_decls.adb @@ -767,26 +767,6 @@ package body Sem_Decls is Element_Element_Inter_Chain, Type_Definition); - -- LRM08 5.3.2.4 Predefined operations on array type - -- - -- Given a type declaration that declares a one-dimensional - -- array type T whose element type is a character type that - -- contains only character literals, the following operation - -- is implicitely declared immediately following the type - -- declaration - if Vhdl_Std >= Vhdl_08 - and then String_Type_Definition /= Null_Iir - and then Get_Kind (Get_Base_Type (Element_Type)) - = Iir_Kind_Enumeration_Type_Definition - and then Get_Only_Characters_Flag - (Get_Base_Type (Element_Type)) - then - Add_Operation (Name_To_String, - Iir_Predefined_Array_To_String, - Unary_Chain, - String_Type_Definition); - end if; - -- LRM08 5.3.2.4 Predefined operations on array types -- In addition, given a type declaration that declares a -- one-dimensional array type T whose elements are of a @@ -939,6 +919,25 @@ package body Sem_Decls is Binary_Chain, Element_Type); end if; end if; + + -- LRM08 5.3.2.4 Predefined operations on array type + -- + -- Given a type declaration that declares a one-dimensional + -- array type T whose element type is a character type that + -- contains only character literals, the following operation + -- is implicitely declared immediately following the type + -- declaration + if Vhdl_Std >= Vhdl_08 + and then String_Type_Definition /= Null_Iir + and then (Get_Kind (Element_Type) + = Iir_Kind_Enumeration_Type_Definition) + and then Get_Only_Characters_Flag (Element_Type) + then + Add_Operation (Name_To_String, + Iir_Predefined_Array_To_String, + Unary_Chain, + String_Type_Definition); + end if; end if; end; |