diff options
author | Tristan Gingold <tgingold@free.fr> | 2022-06-01 07:57:29 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2022-06-01 07:57:29 +0200 |
commit | 30b88e21526330c47a52b3c83d661102f6d426ea (patch) | |
tree | 68d4c230c4c3248bd7325ce76239a084825baa3b /src | |
parent | 0ba57d2457b8341c0ba912cdde12872a349da3b3 (diff) | |
download | ghdl-30b88e21526330c47a52b3c83d661102f6d426ea.tar.gz ghdl-30b88e21526330c47a52b3c83d661102f6d426ea.tar.bz2 ghdl-30b88e21526330c47a52b3c83d661102f6d426ea.zip |
vhdl-parse: do not allow nested context declaration. For #2070
Diffstat (limited to 'src')
-rw-r--r-- | src/vhdl/vhdl-parse.adb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/vhdl/vhdl-parse.adb b/src/vhdl/vhdl-parse.adb index 0266a494e..b480d797f 100644 --- a/src/vhdl/vhdl-parse.adb +++ b/src/vhdl/vhdl-parse.adb @@ -11533,7 +11533,11 @@ package body Vhdl.Parse is is End_Loc : Location_Type; begin - Set_Library_Unit (Unit, Decl); + if Get_Kind (Unit) = Iir_Kind_Context_Declaration then + Error_Msg_Parse ("nested context declaration not allowed"); + else + Set_Library_Unit (Unit, Decl); + end if; -- Skip 'is' Scan; |