aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl/sem_assocs.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2018-09-18 05:29:29 +0200
committerTristan Gingold <tgingold@free.fr>2018-09-18 05:29:29 +0200
commit262c190bfdca756a989ca31b702700ec34d335fc (patch)
treeb6e2e09c413359713dc5646e40ae92fd00866722 /src/vhdl/sem_assocs.adb
parent0f7bdd76d45a453b226ac58ae289bd21cfeb62c2 (diff)
downloadghdl-262c190bfdca756a989ca31b702700ec34d335fc.tar.gz
ghdl-262c190bfdca756a989ca31b702700ec34d335fc.tar.bz2
ghdl-262c190bfdca756a989ca31b702700ec34d335fc.zip
Adjust -Whide (disabled in some useless cases).
Diffstat (limited to 'src/vhdl/sem_assocs.adb')
-rw-r--r--src/vhdl/sem_assocs.adb10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/vhdl/sem_assocs.adb b/src/vhdl/sem_assocs.adb
index 961ec3c5f..33b1f33b1 100644
--- a/src/vhdl/sem_assocs.adb
+++ b/src/vhdl/sem_assocs.adb
@@ -2062,6 +2062,9 @@ package body Sem_Assocs is
Assoc : Iir;
Inter : Iir;
+ -- True if -Whide is enabled (save the state).
+ Warn_Hide_Enabled : Boolean;
+
type Param_Assoc_Type is (None, Open, Individual, Whole);
type Assoc_Array is array (Natural range <>) of Param_Assoc_Type;
@@ -2150,8 +2153,15 @@ package body Sem_Assocs is
-- declaration and that would otherwise be directly visible is
-- hidden.
Sem_Scopes.Open_Declarative_Region;
+
+ -- Do not warn about hidding here, way to common, way useless.
+ Warn_Hide_Enabled := Is_Warning_Enabled (Warnid_Hide);
+ Enable_Warning (Warnid_Hide, False);
+
Sem_Scopes.Add_Declarations_From_Interface_Chain (Interface_Chain);
+ Enable_Warning (Warnid_Hide, Warn_Hide_Enabled);
+
First_Named_Assoc := Assoc;
loop
if Formal = Null_Iir then