aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2021-01-14 19:44:46 +0100
committerTristan Gingold <tgingold@free.fr>2021-01-16 11:20:10 +0100
commit2e769f38257102efca35f2715d3bf241dc628bc5 (patch)
tree93c0b1852f2adf5bf7ace3e1c671458924560309
parentc0edf6732322ed54d3d23ac168b115f09355129c (diff)
downloadghdl-2e769f38257102efca35f2715d3bf241dc628bc5.tar.gz
ghdl-2e769f38257102efca35f2715d3bf241dc628bc5.tar.bz2
ghdl-2e769f38257102efca35f2715d3bf241dc628bc5.zip
vhdl-sem_names: avoid duplicate messages for -fsynopsys
-rw-r--r--src/vhdl/vhdl-sem_names.adb9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/vhdl/vhdl-sem_names.adb b/src/vhdl/vhdl-sem_names.adb
index 5936fecc7..18051465c 100644
--- a/src/vhdl/vhdl-sem_names.adb
+++ b/src/vhdl/vhdl-sem_names.adb
@@ -2334,6 +2334,15 @@ package body Vhdl.Sem_Names is
-- Not a synopsys package.
return;
end case;
+ if Get_Identifier
+ (Get_Library (Get_Design_File (Sem.Get_Current_Design_Unit)))
+ = Name_Ieee
+ then
+ -- No error when referenced from an ieee package. That could
+ -- happen only for synopsys packages, so an error will be
+ -- emitted when the user references the first synopsys package.
+ return;
+ end if;
Error_Msg_Sem
(+Name, "use of synopsys package %i needs the -fsynopsys option",
+Suffix);