]> git.ipfire.org Git - thirdparty/gcc.git/commit
Ada: Rework implementation of Ada.Containers.Bounded_Indefinite_Holders
authorSteve Baird <baird@adacore.com>
Wed, 11 Feb 2026 12:04:20 +0000 (13:04 +0100)
committerEric Botcazou <ebotcazou@adacore.com>
Wed, 11 Feb 2026 12:07:10 +0000 (13:07 +0100)
commit1f8f7ad8cd77e83d75c2e6004a2d2ec8ab8d78cf
tree37d365c0a3a867344040d9dd2940d05c33669b4e
parentcd0bab746909a76e5cb724fba8c7f4ddb194207a
Ada: Rework implementation of Ada.Containers.Bounded_Indefinite_Holders

In particular, this adds support for the case where the Element_Type actual
parameter is a class-wide type.

gcc/ada/
PR ada/124016
* doc/gnat_rm/implementation_defined_attributes.rst: Document
that Finalization_Size attribute is defined for class-wide types.
* exp_attr.adb (Expand_N_Attribute_Reference) <Finalization_Size>:
Add support for class-wide types.
<Size>: Raise Constraint_Error for class-wide types.
* exp_imgv.adb (Expand_Image_Attribute): Adjust call to renaming.
(Expand_Wide_Image_Attribute): Likewise.
(Expand_Wide_Wide_Image_Attribute): Likewise.
* sem_attr.ads (Finalization_Size): Update comment.
* sem_attr.adb (Analyze_Image): Adjust call to renaming.
(Analyze_Attribute): Remove check disallowing Finalization_Size
attribute for class-wide types.
* sem_util.ads (Is_Object_Image): Rename into...
(Is_Object_Prefix): ...this.
* sem_util.adb (Is_Object_Image): Rename into...
(Is_Object_Prefix): ...this.
* libgnat/a-cbinho.ads (Extra_Storage): Use Descriptor_Size and
Finalization_Size attributes.
(Max_Allocation_Overhead_In_Storage_Elements): Delete.
gcc/ada/doc/gnat_rm/implementation_defined_attributes.rst
gcc/ada/exp_attr.adb
gcc/ada/exp_imgv.adb
gcc/ada/libgnat/a-cbinho.ads
gcc/ada/sem_attr.adb
gcc/ada/sem_attr.ads
gcc/ada/sem_util.adb
gcc/ada/sem_util.ads