diff options
author | Tristan Gingold <tgingold@free.fr> | 2022-06-19 16:19:57 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2022-06-19 16:19:57 +0200 |
commit | 6080383b327571d366d3ed69bcf3cd4257a20010 (patch) | |
tree | 79e8c9e58a3b455a459b04bf28bf54b6833db84f /src | |
parent | 7b76e036e0856d49e207e2ff5e406860868523d5 (diff) | |
download | ghdl-6080383b327571d366d3ed69bcf3cd4257a20010.tar.gz ghdl-6080383b327571d366d3ed69bcf3cd4257a20010.tar.bz2 ghdl-6080383b327571d366d3ed69bcf3cd4257a20010.zip |
vhdl-sem_lib: do not disable warnings for files in -c/-r
Diffstat (limited to 'src')
-rw-r--r-- | src/vhdl/vhdl-sem_lib.adb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/vhdl/vhdl-sem_lib.adb b/src/vhdl/vhdl-sem_lib.adb index c4e26ee70..56312701b 100644 --- a/src/vhdl/vhdl-sem_lib.adb +++ b/src/vhdl/vhdl-sem_lib.adb @@ -354,9 +354,13 @@ package body Vhdl.Sem_Lib is -- Disable all warnings. Warnings are emitted only when the unit -- is analyzed. Save_Warnings_Setting (Warnings); - Disable_All_Warnings; if Get_Date_State (Design_Unit) = Date_Disk then + -- The unit is not loaded, so load it. + -- But disable warnings as the unit has already been analyzed. + -- The unit can be in memory but not yet analyzed when -c/-r is + -- used. In that case, warnings shouldn't be disabled. + Disable_All_Warnings; Load_Parse_Design_Unit (Design_Unit, Loc); end if; |