From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13094 invoked by alias); 2 May 2002 19:04:35 -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 13087 invoked from network); 2 May 2002 19:04:33 -0000 Received: from unknown (HELO cygnus.com) (205.180.83.203) by sources.redhat.com with SMTP; 2 May 2002 19:04:33 -0000 Received: from localhost.redhat.com (romulus.sfbay.redhat.com [172.16.27.251]) by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id MAA20389; Thu, 2 May 2002 12:02:36 -0700 (PDT) Received: by localhost.redhat.com (Postfix, from userid 469) id 5890310A8E; Thu, 2 May 2002 15:00:16 -0400 (EDT) From: Elena Zannoni MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15569.36031.696957.947763@localhost.redhat.com> Date: Thu, 02 May 2002 12:04:00 -0000 To: Elena Zannoni Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA] valops.c: don't coerce vectors. In-Reply-To: <15565.48976.671016.923393@localhost.redhat.com> References: <15565.48976.671016.923393@localhost.redhat.com> X-SW-Source: 2002-05/txt/msg00050.txt.bz2 Elena Zannoni writes: > > I hope this is the last of the AltiVec series. > > Elena > > 2002-04-29 Elena Zannoni > > * valops.c (value_arg_coerce): Don't coerce arrays to pointers if > we are dealing with vectors. > > I committed this, given that the file seems unmaintained. Elena > Index: valops.c > =================================================================== > RCS file: /cvs/uberbaum/gdb/valops.c,v > retrieving revision 1.55 > diff -u -p -r1.55 valops.c > --- valops.c 26 Apr 2002 03:37:42 -0000 1.55 > +++ valops.c 29 Apr 2002 21:45:55 -0000 > @@ -1190,8 +1190,12 @@ value_arg_coerce (struct value *arg, str > type = lookup_pointer_type (type); > break; > case TYPE_CODE_ARRAY: > + /* Arrays are coerced to pointers to their first element, unless > + they are vectors, in which case we want to leave them alone, > + because they are passed by value. */ > if (current_language->c_style_arrays) > - type = lookup_pointer_type (TYPE_TARGET_TYPE (type)); > + if (!TYPE_VECTOR (type)) > + type = lookup_pointer_type (TYPE_TARGET_TYPE (type)); > break; > case TYPE_CODE_UNDEF: > case TYPE_CODE_PTR: