This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] valops.c: don't coerce vectors.


Elena Zannoni writes:
 > 
 > I hope this is the last of the AltiVec series.
 > 
 > Elena
 > 
 > 2002-04-29  Elena Zannoni  <ezannoni@redhat.com>
 > 
 > 	* 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:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]