Introduce a new debug switch -gnatdJ to prepend the name of the enclosing entity (subprogram, task, ...) relevant for a given warning or style message. This can be useful in the context of integrating these messages in other tools, e.g. CodePeer or gnatcheck. Tested on x86_64-pc-linux-gnu, committed on trunk 2017-09-08 Arnaud Charlet * exp_intr.adb (Append_Entity_Name): Move to ... * sem_util.ads, sem_util.adb: ... here to share it. (Subprogram_Name): New subprogram, to compute the name of the enclosing subprogram/entity. * errutil.adb (Error_Msg): Fill new field Node. * erroutc.ads (Subprogram_Name_Ptr): New. (Error_Msg_Object): New field Node. * erroutc.adb (dmsg, Output_Msg_Text): Take new field Node into account. * errout.adb (Error_Msg): New variant with node id parameter. Fill new parameter Node when emitting messages. Revert previous changes for Include_Subprogram_In_Messages. * sem_ch5.adb (Check_Unreachable_Code): Supply Node parameter when generating warning message.