diff options
author | Bob Duff <duff@adacore.com> | 2020-07-02 13:32:40 -0400 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2020-10-19 05:53:36 -0400 |
commit | 26349b6d9a4c03cb22104eb1da30362ece3addc5 (patch) | |
tree | 6986430005c782b4d53751434e9395990100df8b /gcc/ada/libgnat/a-ciormu.adb | |
parent | 8c8b92dcc8f0b45af96aecc9e83c52175d6f4ce5 (diff) | |
download | gcc-26349b6d9a4c03cb22104eb1da30362ece3addc5.zip gcc-26349b6d9a4c03cb22104eb1da30362ece3addc5.tar.gz gcc-26349b6d9a4c03cb22104eb1da30362ece3addc5.tar.bz2 |
[Ada] Ada2020: AI12-0304 Put_Image attrs of lang-def types
gcc/ada/
* exp_put_image.adb (Build_Elementary_Put_Image_Call): Use the
base type to recognize various cases of access types.
* libgnat/a-cbdlli.adb, libgnat/a-cbdlli.ads, libgnat/a-cbhama.adb,
libgnat/a-cbhama.ads, libgnat/a-cbhase.adb, libgnat/a-cbhase.ads,
libgnat/a-cbmutr.adb, libgnat/a-cbmutr.ads, libgnat/a-cborma.adb,
libgnat/a-cborma.ads, libgnat/a-cborse.adb, libgnat/a-cborse.ads,
libgnat/a-cdlili.adb, libgnat/a-cdlili.ads, libgnat/a-cidlli.adb,
libgnat/a-cidlli.ads, libgnat/a-cihama.adb, libgnat/a-cihama.ads,
libgnat/a-cihase.adb, libgnat/a-cihase.ads, libgnat/a-cimutr.adb,
libgnat/a-cimutr.ads, libgnat/a-ciorma.adb, libgnat/a-ciorma.ads,
libgnat/a-ciormu.adb, libgnat/a-ciormu.ads, libgnat/a-ciorse.adb,
libgnat/a-ciorse.ads, libgnat/a-coboho.adb, libgnat/a-coboho.ads,
libgnat/a-cobove.adb, libgnat/a-cobove.ads, libgnat/a-cohama.adb,
libgnat/a-cohama.ads, libgnat/a-cohase.adb, libgnat/a-cohase.ads,
libgnat/a-coinho.adb, libgnat/a-coinho.ads,
libgnat/a-coinho__shared.adb, libgnat/a-coinho__shared.ads,
libgnat/a-coinve.adb, libgnat/a-coinve.ads, libgnat/a-comutr.adb,
libgnat/a-comutr.ads, libgnat/a-coorma.adb, libgnat/a-coorma.ads,
libgnat/a-coormu.adb, libgnat/a-coormu.ads, libgnat/a-coorse.adb,
libgnat/a-coorse.ads, libgnat/a-strunb.adb, libgnat/a-strunb.ads,
libgnat/a-strunb__shared.adb, libgnat/a-strunb__shared.ads:
Implement Put_Image attibute.
* libgnat/a-stteou.ads, libgnat/s-putima.ads,
libgnat/a-stouut.ads, libgnat/a-stoubu.adb: Make
Ada.Strings.Text_Output, Ada.Strings.Text_Output.Utils, and
System.Put_Images Pure, so they can be with'ed by Pure units
that should have Put_Image defined.
* libgnat/a-stouut.adb: Add missing column adjustments, and
remove a redundant one.
* libgnat/s-putima.adb (Put_Arrow): New routine to print an
arrow. Avoids adding a with clause to some containers.
Diffstat (limited to 'gcc/ada/libgnat/a-ciormu.adb')
-rw-r--r-- | gcc/ada/libgnat/a-ciormu.adb | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/gcc/ada/libgnat/a-ciormu.adb b/gcc/ada/libgnat/a-ciormu.adb index 110d734..c3672f4 100644 --- a/gcc/ada/libgnat/a-ciormu.adb +++ b/gcc/ada/libgnat/a-ciormu.adb @@ -39,6 +39,7 @@ with Ada.Containers.Red_Black_Trees.Generic_Set_Operations; pragma Elaborate_All (Ada.Containers.Red_Black_Trees.Generic_Set_Operations); with System; use type System.Address; +with System.Put_Images; package body Ada.Containers.Indefinite_Ordered_Multisets with SPARK_Mode => Off @@ -1657,6 +1658,31 @@ is end; end Query_Element; + --------------- + -- Put_Image -- + --------------- + + procedure Put_Image + (S : in out Ada.Strings.Text_Output.Sink'Class; V : Set) + is + First_Time : Boolean := True; + use System.Put_Images; + begin + Array_Before (S); + + for X of V loop + if First_Time then + First_Time := False; + else + Simple_Array_Between (S); + end if; + + Element_Type'Put_Image (S, X); + end loop; + + Array_After (S); + end Put_Image; + ---------- -- Read -- ---------- |