This commit fixes a small bug where GNAT would emit unescaped quotes in
its -fdiagnostics-format=json output when using -gnatdJ and emitting
messages about operator functions (e.g. "=").
gcc/ada/
* errout.adb (Write_JSON_Span): Escape subprogram name.
end if;
if Include_Subprogram_In_Messages then
- Write_Str
- (",""subprogram"":""" & Subprogram_Name_Ptr (Error.Node) & """");
+ Write_Str (",""subprogram"":""");
+ Write_JSON_Escaped_String (Subprogram_Name_Ptr (Error.Node));
+ Write_Str ("""");
end if;
Write_Str ("}");