From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4480 invoked by alias); 3 Nov 2011 17:34:20 -0000 Received: (qmail 4422 invoked by uid 22791); 3 Nov 2011 17:34:19 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 03 Nov 2011 17:34:04 +0000 From: "simon at pushface dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug ada/50934] Attribute Max_Size_In_Storage_Elements is wrong for controlled types Date: Thu, 03 Nov 2011 17:34:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: ada X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: simon at pushface dot org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2011-11/txt/msg00306.txt.bz2 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;