aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/libgnat/a-stoufo.adb
diff options
context:
space:
mode:
authorBob Duff <duff@adacore.com>2020-03-31 18:59:11 -0400
committerPierre-Marie de Rodat <derodat@adacore.com>2020-06-15 04:04:38 -0400
commitacc20d256c51f394904b904e8a8ceea3a44855fc (patch)
treeb11a3f53620fa45fafdb068a26d75ac2412a3f66 /gcc/ada/libgnat/a-stoufo.adb
parent2b20de3abdb894c847d2741f35910d584c8f699a (diff)
downloadgcc-acc20d256c51f394904b904e8a8ceea3a44855fc.zip
gcc-acc20d256c51f394904b904e8a8ceea3a44855fc.tar.gz
gcc-acc20d256c51f394904b904e8a8ceea3a44855fc.tar.bz2
[Ada] T'Image calls T'Put_Image
2020-06-15 Bob Duff <duff@adacore.com> gcc/ada/ * exp_put_image.ads, exp_put_image.adb (Image_Should_Call_Put_Image): New function to determine whether the call to Put_Image should be generated. (Build_Image_Call): New procedure to generate the call to Put_Image. * exp_imgv.adb (Expand_Image_Attribute): Use underlying types to bypass privacy (only in Ada 2020). If Image_Should_Call_Put_Image is True (which happens only in Ada 2020), then call Build_Image_Call. * rtsfind.ads, rtsfind.adb: Add the necessary declarations in Ada.Strings.Text_Output.Buffers. * sem_attr.adb (Check_Image_Type): Enable the Ada 2020 case. * libgnat/a-stoufo.ads, libgnat/a-stoufo.adb: Use the less restrictive type that allows newline characters.
Diffstat (limited to 'gcc/ada/libgnat/a-stoufo.adb')
-rw-r--r--gcc/ada/libgnat/a-stoufo.adb20
1 files changed, 10 insertions, 10 deletions
diff --git a/gcc/ada/libgnat/a-stoufo.adb b/gcc/ada/libgnat/a-stoufo.adb
index 0cbcd56..3b99cf7 100644
--- a/gcc/ada/libgnat/a-stoufo.adb
+++ b/gcc/ada/libgnat/a-stoufo.adb
@@ -38,7 +38,7 @@ package body Ada.Strings.Text_Output.Formatting is
procedure Put
(S : in out Sink'Class; T : Template;
- X1, X2, X3, X4, X5, X6 : UTF_8 := "")
+ X1, X2, X3, X4, X5, X6 : UTF_8_Lines := "")
is
J : Positive := T'First;
Used : array (1 .. 6) of Boolean := (others => False);
@@ -62,22 +62,22 @@ package body Ada.Strings.Text_Output.Formatting is
when '1' =>
Used (1) := True;
- Put_UTF_8 (S, X1);
+ Put_UTF_8_Lines (S, X1);
when '2' =>
Used (2) := True;
- Put_UTF_8 (S, X2);
+ Put_UTF_8_Lines (S, X2);
when '3' =>
Used (3) := True;
- Put_UTF_8 (S, X3);
+ Put_UTF_8_Lines (S, X3);
when '4' =>
Used (4) := True;
- Put_UTF_8 (S, X4);
+ Put_UTF_8_Lines (S, X4);
when '5' =>
Used (5) := True;
- Put_UTF_8 (S, X5);
+ Put_UTF_8_Lines (S, X5);
when '6' =>
Used (6) := True;
- Put_UTF_8 (S, X6);
+ Put_UTF_8_Lines (S, X6);
when others =>
raise Program_Error;
@@ -113,21 +113,21 @@ package body Ada.Strings.Text_Output.Formatting is
procedure Put
(T : Template;
- X1, X2, X3, X4, X5, X6 : UTF_8 := "") is
+ X1, X2, X3, X4, X5, X6 : UTF_8_Lines := "") is
begin
Put (Files.Standard_Output.all, T, X1, X2, X3, X4, X5, X6);
end Put;
procedure Err
(T : Template;
- X1, X2, X3, X4, X5, X6 : UTF_8 := "") is
+ X1, X2, X3, X4, X5, X6 : UTF_8_Lines := "") is
begin
Put (Files.Standard_Error.all, T, X1, X2, X3, X4, X5, X6);
end Err;
function Format
(T : Template;
- X1, X2, X3, X4, X5, X6 : UTF_8 := "")
+ X1, X2, X3, X4, X5, X6 : UTF_8_Lines := "")
return UTF_8_Lines
is
Buf : Buffer := New_Buffer;