aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl/vhdl-sem_decls.adb
diff options
context:
space:
mode:
Diffstat (limited to 'src/vhdl/vhdl-sem_decls.adb')
-rw-r--r--src/vhdl/vhdl-sem_decls.adb11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/vhdl/vhdl-sem_decls.adb b/src/vhdl/vhdl-sem_decls.adb
index 2f29562bf..9e98c26a3 100644
--- a/src/vhdl/vhdl-sem_decls.adb
+++ b/src/vhdl/vhdl-sem_decls.adb
@@ -2227,11 +2227,10 @@ package body Vhdl.Sem_Decls is
when Iir_Kind_Architecture_Body
| Iir_Kind_Block_Statement =>
-- Might be used in a configuration.
- -- FIXME: create a second level of warning.
- null;
+ Check_Unused := True;
when Iir_Kind_Generate_Statement_Body =>
-- Might be used in a configuration.
- null;
+ Check_Unused := True;
when Iir_Kind_Package_Body
| Iir_Kind_Protected_Type_Body =>
-- Check only for declarations of the body.
@@ -2311,6 +2310,12 @@ package body Vhdl.Sem_Decls is
Warning_Msg_Sem (Warnid_Unused, +El,
"%n is never referenced", +El);
end if;
+ when Iir_Kind_Signal_Declaration
+ | Iir_Kind_Variable_Declaration =>
+ if not Get_Use_Flag (El) then
+ Warning_Msg_Sem (Warnid_Unused, +El,
+ "%n is never referenced", +El);
+ end if;
when others =>
null;
end case;