From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6537 invoked by alias); 2 May 2002 07:22:47 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 6529 invoked from network); 2 May 2002 07:22:45 -0000 Received: from unknown (HELO zwingli.cygnus.com) (208.245.165.35) by sources.redhat.com with SMTP; 2 May 2002 07:22:45 -0000 Received: by zwingli.cygnus.com (Postfix, from userid 442) id 370DE5EA11; Thu, 2 May 2002 02:22:44 -0500 (EST) To: Elena Zannoni Cc: Kevin Buettner , gdb-patches@sources.redhat.com Subject: Re: [RFA] Altivec ABI patches References: <15561.48188.141526.557982@localhost.redhat.com> <1020426230236.ZM31350@localhost.localdomain> <15562.646.506619.140778@localhost.redhat.com> <1020427080809.ZM32701@localhost.localdomain> <15565.26939.309256.444181@localhost.redhat.com> <15565.44421.333605.509796@localhost.redhat.com> From: Jim Blandy Date: Thu, 02 May 2002 00:22:00 -0000 In-Reply-To: Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2002-05/txt/msg00027.txt.bz2 Jim Blandy writes: > Elena Zannoni writes: > > Jim Blandy writes: > > > > > > I don't see anything here that prevents vectors from being coerced to > > > pointers to their first element. Isn't there some change needed in > > > evaluate_subexp_with_coercion? > > > > You mean value_arg_coerce()? > > Err, ... yeah, that's what I meant. :) Wait, no. If `v' is a vector variable, and the user types `print v + 2', that should be an error, right? But somehow it'll get promoted to a pointer to its first element. value_add calls COERCE_NUMBER, which calls COERCE_ARRAY. I think that's what you need to fix. Note that value_subscript already handles arrays specially --- it doesn't depend on C's array coercion --- so it should continue to work. I think. You may have already done this, but I'd grep for TYPE_CODE_ARRAY and make sure each case is handled properly.