2018-05-25 Arnaud Charlet <charlet@adacore.com>
gcc/ada/
* pprint.adb (Expression_Name): Strip too long expressions to avoid
carrying very large strings.
From-SVN: r260732
+2018-05-25 Arnaud Charlet <charlet@adacore.com>
+
+ * pprint.adb (Expression_Name): Strip too long expressions to avoid
+ carrying very large strings.
+
2018-05-25 Patrick Bernardi <bernardi@adacore.com>
* switch-b.adb (Scan_Binder_Switches): binder switch -Q accepts Natural
end if;
declare
+ Threshold : constant := 256;
Buffer : String (1 .. Natural (End_Sloc - Scn));
Index : Natural := 0;
Skipping_Comment : Boolean := False;
end if;
end case;
+ -- Give up on too long strings
+
+ if Index >= Threshold then
+ return Buffer (1 .. Index) & "...";
+ end if;
+
Scn := Scn + 1;
end loop;
end if;