aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2019-08-08 04:40:56 +0200
committerTristan Gingold <tgingold@free.fr>2019-08-08 04:40:56 +0200
commit2c7024f1845bab48157b49eccb3660c2af156f5b (patch)
tree3f0a9472c45fdc30750c44414a64f5694c9ab925
parent5738c8a722b3eec9713bce9b83a5283a2001582f (diff)
downloadghdl-2c7024f1845bab48157b49eccb3660c2af156f5b.tar.gz
ghdl-2c7024f1845bab48157b49eccb3660c2af156f5b.tar.bz2
ghdl-2c7024f1845bab48157b49eccb3660c2af156f5b.zip
vhdl: remove -Whides warnings for processes without a label.
-rw-r--r--src/vhdl/vhdl-sem_scopes.adb9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/vhdl/vhdl-sem_scopes.adb b/src/vhdl/vhdl-sem_scopes.adb
index 85e46000c..ac97bbeb0 100644
--- a/src/vhdl/vhdl-sem_scopes.adb
+++ b/src/vhdl/vhdl-sem_scopes.adb
@@ -427,6 +427,15 @@ package body Vhdl.Sem_Scopes is
return;
end if;
+ if Name_Table.Get_Name_Ptr (Get_Identifier (Decl))(1) = 'P' then
+ -- Do not warn for labels starting with 'P'. These are canonicalized
+ -- process labels which are scoped.
+ -- This can happen as an architecture is canonicalized during
+ -- analysis and then its declarations are 'imported' by a
+ -- configuration.
+ return;
+ end if;
+
Warning_Msg_Sem (Warnid_Hide, +Decl,
"declaration of %i hides %n", (+Decl, +Prev_Decl));
end Warning_Hide;