[Ada] Improve error messages to include full package name
authorJustin Squirek <squirek@adacore.com>
Mon, 3 Jan 2022 08:26:44 +0000 (08:26 +0000)
committerPierre-Marie de Rodat <derodat@adacore.com>
Mon, 9 May 2022 09:27:35 +0000 (09:27 +0000)
commit7ded77bbce506b12a4f2bbe751b304ebdcb9af27
tree5f500bf67da1d794778b83cab07c28f1f34a2091
parent706940c2c867bc2609338f27eaea056aedc13d63
[Ada] Improve error messages to include full package name

This patch improves error messages in the compiler so that missing
'with' error messages show the complete package name instead of a
limited number of selectors.

gcc/ada/

* err_vars.ads: Add new error message names and nodes.
* erroutc.adb (Set_Msg_Insertion_Name,
Set_Msg_Insertion_Name_Literal): Likewise.
* errout.adb (Set_Msg_Insertion_Node): Likewise.
* errout.ads: Likewise.
* exp_disp.adb (Check_Premature_Freezing): Modify setting of
Error_Msg_Node_2 to occur directly before Error_Msg call where
applicable.
* sem_ch8.adb (Error_Missing_With_Of_Known_Unit): Added to
handle the printing of full package names of known units.
(Undefined, Find_Expanded_Name): Replace error printing with
call to Error_Missing_With_Of_Known_Unit.
gcc/ada/err_vars.ads
gcc/ada/errout.adb
gcc/ada/errout.ads
gcc/ada/erroutc.adb
gcc/ada/exp_disp.adb
gcc/ada/sem_ch8.adb