This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug ada/50934] Attribute Max_Size_In_Storage_Elements is wrong for controlled types
- From: "simon at pushface dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 03 Nov 2011 17:34:01 +0000
- Subject: [Bug ada/50934] Attribute Max_Size_In_Storage_Elements is wrong for controlled types
- Auto-submitted: auto-generated
- References: <bug-50934-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50934
--- Comment #3 from simon at pushface dot org 2011-11-03 17:34:01 UTC ---
(In reply to comment #1)
> It seems to me that this new approach is a remarkably non-Ada way of addressing
> the problem; the original design is precisely the way that it should be
> addressed. Of course I have absolutely no objection to delegating this
> management to Ada.Finalization.Heap_Management (I think this should now in fact
> be System.Finalization_Masters). But System.Finalization_Root.Root_Controlled
> should contain a System.Finalization_Masters.FM_Node.
Apologies all round; this isn't correct, because a type with a component of a
controlled type also needs finalization support; for example,
type E is record
Str : Ada.Strings.Unbounded.Unbounded_String;
end record;
type E_P is access E;
for E_P'Storage_Size use E'Max_Size_In_Storage_Elements * 4;