From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16604 invoked by alias); 26 Sep 2008 23:04:15 -0000 Received: (qmail 16594 invoked by uid 22791); 26 Sep 2008 23:04:13 -0000 X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 26 Sep 2008 23:03:18 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id m8QN2tI9017807; Fri, 26 Sep 2008 19:02:55 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m8QN2sOe029786; Fri, 26 Sep 2008 19:02:55 -0400 Received: from opsy.redhat.com (vpn-10-95.bos.redhat.com [10.16.10.95]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id m8QN2r5W023045; Fri, 26 Sep 2008 19:02:54 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id B1C9E37824E; Fri, 26 Sep 2008 17:01:49 -0600 (MDT) To: Joel Brobecker Cc: Jan Kratochvil , gdb-patches@sourceware.org Subject: Re: [patch] static_kind -> bit0, bit1 [Re: [gdb] Fortran dynamic arrays] References: <20080818111120.GE16894@adacore.com> <200808181553.m7IFrG3w005270@d12av02.megacenter.de.ibm.com> <48A59B3C.9050801@net-b.de> <20080818111120.GE16894@adacore.com> <20080907115637.GA12939@host0.dyn.jankratochvil.net> <20080908172701.GA18549@host0.dyn.jankratochvil.net> <20080919222852.GB23372@adacore.com> From: Tom Tromey Reply-To: tromey@redhat.com X-Attribution: Tom Date: Fri, 26 Sep 2008 23:04:00 -0000 In-Reply-To: <20080919222852.GB23372@adacore.com> (Joel Brobecker's message of "Fri\, 19 Sep 2008 15\:28\:52 -0700") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-09/txt/msg00530.txt.bz2 >>>>> "Joel" == Joel Brobecker writes: [ type rearrangements ] Joel> As you suggest, this is easily achievable in C as well by using Joel> unions, with the one difference is that Ada does some access Joel> check and makes sure that we access fields that are consistent Joel> with the discriminant (field named "Kind" in the example above). GCC accomplishes this using checking in the accessor macros. For the most part this works well -- it certainly catches bugs. Joel> I think that this would help clarify the whole structure, and tell us Joel> what is and what is not used for each kind of type. But I am not sure Joel> of the drawbacks... For sure this would be a pretty significant change Joel> througout GDB, but maybe an interesting one. Joel> (that was my windy way of saying: I think I agree) I think it would be a good idea provided that there's some data indicating that the space savings is worthwhile. I'm not sure what would qualify here. Tom