mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-29 04:53:56 +08:00
2002-05-02 Elena Zannoni <ezannoni@redhat.com>
* valops.c (value_arg_coerce): Don't coerce arrays to pointers if we are dealing with vectors.
This commit is contained in:
parent
84de6048cc
commit
a3162708df
@ -1,3 +1,8 @@
|
||||
2002-05-02 Elena Zannoni <ezannoni@redhat.com>
|
||||
|
||||
* valops.c (value_arg_coerce): Don't coerce arrays to pointers if
|
||||
we are dealing with vectors.
|
||||
|
||||
2002-05-02 Pierre Muller <muller@ics.u-strasbg.fr>
|
||||
|
||||
* config/m68k/tm-nbsd.h: Obvious fix,
|
||||
|
@ -1190,8 +1190,12 @@ value_arg_coerce (struct value *arg, struct type *param_type,
|
||||
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:
|
||||
|
Loading…
Reference in New Issue
Block a user