From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23580 invoked by alias); 8 Dec 2008 23:31:16 -0000 Received: (qmail 23571 invoked by uid 22791); 8 Dec 2008 23:31:12 -0000 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 08 Dec 2008 23:30:16 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 215A92A9682; Mon, 8 Dec 2008 18:30:15 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 4pHqNgpn7ylf; Mon, 8 Dec 2008 18:30:15 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id DE0BC2A964E; Mon, 8 Dec 2008 18:30:14 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 1BAFCE7ACD; Tue, 9 Dec 2008 00:30:13 +0100 (CET) Date: Mon, 08 Dec 2008 23:31:00 -0000 From: Joel Brobecker To: Jerome Guitton Cc: gdb-patches@sourceware.org Subject: Re: [RFA/Ada] remove ref to fields and ref to slices Message-ID: <20081208233013.GJ3823@adacore.com> References: <20081127100443.GA64300@adacore.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20081127100443.GA64300@adacore.com> User-Agent: Mutt/1.4.2.2i 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-12/txt/msg00161.txt.bz2 > 2008-11-27 Jerome Guitton > > * ada-lang.c (ada_value_slice_ptr): Return a lazy value instead > of a reference. Update comment. > (ada_value_struct_elt): Ditto if arg is a pointer or a reference. > Update comment as well. OK, but a couple of comments: > static struct value * > ada_value_slice_ptr (struct value *array_ptr, struct type *type, > int low, int high) Could you rename this function to "ada_value_slice"? Since we no longer return a pointer to the slice but the slice itself, the _ptr suffix could be confusing. > @@ -6178,9 +6178,7 @@ ada_index_struct_field_1 (int *index_p, > /* Given ARG, a value of type (pointer or reference to a)* > structure/union, extract the component named NAME from the ultimate > target structure/union and return it as a value with its > - appropriate type. If ARG is a pointer or reference and the field > - is not packed, returns a reference to the field, otherwise the > - value of the field (an lvalue if ARG is an lvalue). > + appropriate type. Return the value of the field. The last sentence you added seems redundant with the one before it (that you adjusted). -- Joel