diff options
author | Tristan Gingold <tgingold@free.fr> | 2018-04-24 18:52:53 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2018-04-24 18:52:53 +0200 |
commit | 0c5810f8f576f59a92a2863c4e6408b04590e863 (patch) | |
tree | b6d0d650e04e4f0f5e233e001bc6d47053d60ce1 /src/vhdl/sem_names.adb | |
parent | 08b56bd39ce2cb2bf0641e8fb5eb58d6a1b25b8c (diff) | |
download | ghdl-0c5810f8f576f59a92a2863c4e6408b04590e863.tar.gz ghdl-0c5810f8f576f59a92a2863c4e6408b04590e863.tar.bz2 ghdl-0c5810f8f576f59a92a2863c4e6408b04590e863.zip |
Improve error message for #560.
Diffstat (limited to 'src/vhdl/sem_names.adb')
-rw-r--r-- | src/vhdl/sem_names.adb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/vhdl/sem_names.adb b/src/vhdl/sem_names.adb index d8d7dea6e..141563292 100644 --- a/src/vhdl/sem_names.adb +++ b/src/vhdl/sem_names.adb @@ -1830,7 +1830,15 @@ package body Sem_Names is if not Valid_Interpretation (Interpretation) then -- Unknown name. if not Soft then - Error_Msg_Sem (+Name, "no declaration for %i", +Name); + Interpretation := Get_Interpretation_Raw (Id); + if Valid_Interpretation (Interpretation) + and then Is_Conflict_Declaration (Interpretation) + then + Error_Msg_Sem + (+Name, "no declaration for %i (due to conflicts)", +Name); + else + Error_Msg_Sem (+Name, "no declaration for %i", +Name); + end if; end if; Res := Error_Mark; elsif not Valid_Interpretation (Get_Next_Interpretation (Interpretation)) |