aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl/sem_types.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2017-11-28 06:12:11 +0100
committerTristan Gingold <tgingold@free.fr>2017-11-28 06:12:11 +0100
commitfb6930072c61baa1dd5d64af2b5c37c7b53347bf (patch)
tree5a58e7069753917770b144f71da8fa936a42da77 /src/vhdl/sem_types.adb
parent7d95eb2ad556102dbb3514ef17299fcc3c3b57b4 (diff)
downloadghdl-fb6930072c61baa1dd5d64af2b5c37c7b53347bf.tar.gz
ghdl-fb6930072c61baa1dd5d64af2b5c37c7b53347bf.tar.bz2
ghdl-fb6930072c61baa1dd5d64af2b5c37c7b53347bf.zip
Avoid crash on non-allowed declarations in protected types.
Fix #470.
Diffstat (limited to 'src/vhdl/sem_types.adb')
-rw-r--r--src/vhdl/sem_types.adb7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/vhdl/sem_types.adb b/src/vhdl/sem_types.adb
index 45f67be51..528a672ed 100644
--- a/src/vhdl/sem_types.adb
+++ b/src/vhdl/sem_types.adb
@@ -597,9 +597,14 @@ package body Sem_Types is
end if;
end if;
end;
+ when Iir_Kind_Anonymous_Type_Declaration =>
+ -- This is an error, but an anonynmous type declaration is
+ -- followed by a subtype declaration, which is also an error.
+ -- Avoid duplicate messages.
+ null;
when others =>
Error_Msg_Sem
- (+El, "%n are not allowed in protected type declaration",
+ (+El, "%n is not allowed in protected type declaration",
+El);
end case;
El := Get_Chain (El);