aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl/vhdl-sem.adb
diff options
context:
space:
mode:
Diffstat (limited to 'src/vhdl/vhdl-sem.adb')
-rw-r--r--src/vhdl/vhdl-sem.adb12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/vhdl/vhdl-sem.adb b/src/vhdl/vhdl-sem.adb
index 03351c914..ff963ec38 100644
--- a/src/vhdl/vhdl-sem.adb
+++ b/src/vhdl/vhdl-sem.adb
@@ -184,8 +184,16 @@ package body Vhdl.Sem is
-- Makes the entity name visible.
-- FIXME: quote LRM.
- Sem_Scopes.Add_Name
- (Entity_Library, Get_Identifier (Entity_Library), False);
+ declare
+ Prev_Hide : constant Boolean := Is_Warning_Enabled (Warnid_Hide);
+ begin
+ -- Avoid spurious warning from entity name (if it has the same
+ -- identifier as a library clause).
+ Enable_Warning (Warnid_Hide, False);
+ Sem_Scopes.Add_Name
+ (Entity_Library, Get_Identifier (Entity_Library), False);
+ Enable_Warning (Warnid_Hide, Prev_Hide);
+ end;
-- LRM 10.1 Declarative Region
-- 1. An entity declaration, together with a corresponding architecture