summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTristan Gingold2015-05-09 22:00:52 +0200
committerTristan Gingold2015-05-09 22:00:52 +0200
commit98148ccf5ad3b7686b824991a9dd0884f7753277 (patch)
tree80bbb9b0fd70cb70debbf1a78c82a8d49767cf78 /src
parent0650183330f4ab87aa28a09c13486c1fe2d86552 (diff)
downloadghdl-98148ccf5ad3b7686b824991a9dd0884f7753277.tar.gz
ghdl-98148ccf5ad3b7686b824991a9dd0884f7753277.tar.bz2
ghdl-98148ccf5ad3b7686b824991a9dd0884f7753277.zip
Report incorrect use of 'Base.
Diffstat (limited to 'src')
-rw-r--r--src/vhdl/sem_decls.adb3
-rw-r--r--src/vhdl/sem_names.adb6
2 files changed, 7 insertions, 2 deletions
diff --git a/src/vhdl/sem_decls.adb b/src/vhdl/sem_decls.adb
index 1332ff9..a1b39c3 100644
--- a/src/vhdl/sem_decls.adb
+++ b/src/vhdl/sem_decls.adb
@@ -2364,6 +2364,9 @@ package body Sem_Decls is
null;
when Iir_Kind_Terminal_Declaration =>
null;
+ when Iir_Kind_Base_Attribute =>
+ Error_Msg_Sem ("base attribute not allowed in alias", Alias);
+ return;
when others =>
Error_Kind ("sem_non_object_alias_declaration", N_Entity);
end case;
diff --git a/src/vhdl/sem_names.adb b/src/vhdl/sem_names.adb
index 87f9402..ad1b17d 100644
--- a/src/vhdl/sem_names.adb
+++ b/src/vhdl/sem_names.adb
@@ -3692,8 +3692,10 @@ package body Sem_Names is
| Iir_Kind_Implicit_Dereference
| Iir_Kind_Dereference
| Iir_Kind_Attribute_Value
- | Iir_Kind_Function_Call
- | Iir_Kinds_Attribute =>
+ | Iir_Kind_Function_Call =>
+ return True;
+ when Iir_Kinds_Expression_Attribute =>
+ -- All expression attributes are a name.
return True;
when Iir_Kind_Simple_Name
| Iir_Kind_Selected_Name =>