diff options
author | Tristan Gingold <tgingold@free.fr> | 2018-12-26 06:07:09 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2018-12-26 06:59:48 +0100 |
commit | b19787b12897fed179053e87cc6a468ca306d799 (patch) | |
tree | 2bba6befa28eac1e159cd73190dbc7a986f12618 /src/vhdl | |
parent | c31485ff2c32f2aaf6e00e3447be2783a49bd71e (diff) | |
download | ghdl-b19787b12897fed179053e87cc6a468ca306d799.tar.gz ghdl-b19787b12897fed179053e87cc6a468ca306d799.tar.bz2 ghdl-b19787b12897fed179053e87cc6a468ca306d799.zip |
sem: avoid duplicate warnings for subprogram interfaces.
Fix #719
Diffstat (limited to 'src/vhdl')
-rw-r--r-- | src/vhdl/sem.adb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/vhdl/sem.adb b/src/vhdl/sem.adb index efa7d34c5..89babd3fc 100644 --- a/src/vhdl/sem.adb +++ b/src/vhdl/sem.adb @@ -1991,6 +1991,7 @@ package body Sem is procedure Sem_Subprogram_Body (Subprg : Iir) is Spec : constant Iir := Get_Subprogram_Specification (Subprg); + Warn_Hide_Enabled : constant Boolean := Is_Warning_Enabled (Warnid_Hide); El : Iir; begin Set_Impure_Depth (Subprg, Iir_Depth_Pure); @@ -2001,7 +2002,10 @@ package body Sem is Open_Declarative_Region; Set_Is_Within_Flag (Spec, True); - -- Add the interface names into the current declarative region. + -- Add the interface names into the current declarative region. + -- (Do not emit warnings for hiding, they were already emitted during + -- analysis of the subprogram spec). + Enable_Warning (Warnid_Hide, False); El := Get_Interface_Declaration_Chain (Spec); while El /= Null_Iir loop Add_Name (El, Get_Identifier (El), False); @@ -2010,6 +2014,7 @@ package body Sem is end if; El := Get_Chain (El); end loop; + Enable_Warning (Warnid_Hide, Warn_Hide_Enabled); Sem_Sequential_Statements (Spec, Subprg); |