This enables better integration with tools that handle GNAT's output. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * erroutc.ads (Get_Warning_Option): New function returning the option responsible for a warning if it exists. * erroutc.adb (Get_Warning_Option): Likewise. (Get_Warning_Tag): Rely on Get_Warning_Option when possible. * errout.adb (Output_JSON_Message): Emit option field.