aboutsummaryrefslogtreecommitdiff
path: root/libcpp/directives.cc
diff options
context:
space:
mode:
authorSteve Baird <baird@adacore.com>2022-11-10 17:15:33 -0800
committerMarc Poulhiès <poulhies@adacore.com>2022-11-21 11:10:33 +0100
commit76aac607c7eb53313cfd907a31cee6c5e4f550ae (patch)
treebc38894e1583acfe4e6ebf0fb43f51bc164c430e /libcpp/directives.cc
parent7dcf757a5192d399295736b57d63a73136523bcb (diff)
downloadgcc-76aac607c7eb53313cfd907a31cee6c5e4f550ae.zip
gcc-76aac607c7eb53313cfd907a31cee6c5e4f550ae.tar.gz
gcc-76aac607c7eb53313cfd907a31cee6c5e4f550ae.tar.bz2
ada: Ada 2022 Image attribute bugs
Two issues. First, the two procedures Ada.Strings.Text_Buffers.Output_Mapping.[Wide_]Wide_Put each correctly call Encode, but that call was missing from the corresponding Put procedure. Second, if a record type contains an array-valued Data component as well as both a Max_Length and Current_Length component, then the slice Data (Current_Length + 1 .. Max_Length) should usually be treated like uninitialized data. It should not participate in things like equality comparisons. In particular, it should not participate in 'Image results. To accomplish this, such a type usually ought to have a Put_Image aspect specification. This Put_Image aspect specification was missing for the three Super_String types declared in the Ada.Strings.[Wide_[Wide_]]Superbounded packages. gcc/ada/ * libgnat/a-sttebu.adb (Put): Add missing call to Encode. * libgnat/a-strsup.ads: Declare new Put_Image procedure and add Put_Image aspect specification for type Super_String. * libgnat/a-strsup.adb (Put_Image): New procedure. * libgnat/a-stwisu.ads: Declare new Put_Image procedure and add Put_Image aspect specification for type Super_String. * libgnat/a-stwisu.adb (Put_Image): New procedure. * libgnat/a-stzsup.ads: Declare new Put_Image procedure and add Put_Image aspect specification for type Super_String. * libgnat/a-stzsup.adb (Put_Image): New procedure.
Diffstat (limited to 'libcpp/directives.cc')
0 files changed, 0 insertions, 0 deletions