From 377964ad44b26804482173b0fa1ec5a98f2a4862 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Wed, 4 Aug 2021 10:22:00 +0200 Subject: vhdl-sem_expr: add comments --- src/vhdl/vhdl-sem_expr.adb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/vhdl') diff --git a/src/vhdl/vhdl-sem_expr.adb b/src/vhdl/vhdl-sem_expr.adb index cd3d4826a..0f46a8687 100644 --- a/src/vhdl/vhdl-sem_expr.adb +++ b/src/vhdl/vhdl-sem_expr.adb @@ -3199,6 +3199,11 @@ package body Vhdl.Sem_Expr is end if; end loop; if not Found then + -- LRM08 9.3.3.2 Record aggregates + -- If the choise OTHERS is given as a choice, it shall + -- represent at least one element. + -- GHDL: so that the type of the associated expression + -- is known. Error_Msg_Sem (+El, "no element for choice others"); Ok := False; end if; @@ -3249,6 +3254,7 @@ package body Vhdl.Sem_Expr is Set_Expr_Staticness (Aggr, Min (Get_Expr_Staticness (Aggr), Expr_Staticness)); + -- Create a constrained subtype for the aggregate type if Ok and Add_Constraints then declare Rec_Type : Iir; -- cgit v1.2.3