From: Per Bothner Date: Wed, 24 Jan 1996 00:35:09 +0000 (+0000) Subject: * value.h (COERCE_ARRAY): Don't coerce enums. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=533bda77040578d94e4151d6b5f9bbe63c7a9d9d;p=binutils-gdb.git * value.h (COERCE_ARRAY): Don't coerce enums. (COERCE_ENUM): Don't COERCE_REF. (COERCE_NUMBER): New macro (same as COERCE_ARRAY then COERCE_ENUM). * valops.c (value_assign): Only do COERCE_ARRAY if internalvar (let value_cast handle it otherwise); do *not* COERCE_ENUM either way. * valarith.c: Use COERCE_NUMBER instead od COEREC_ARRAY. Add COERCE_REF before COERCE_ENUM. * values.c (value_as_long): Simplify. This fixes PR chill/8869. * valops.c (value_array): Create internalvar if !c_style_arrays. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 0d703fb0492..50aaf96b299 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,16 @@ Tue Jan 23 14:36:05 1996 Per Bothner + * value.h (COERCE_ARRAY): Don't coerce enums. + (COERCE_ENUM): Don't COERCE_REF. + (COERCE_NUMBER): New macro (same as COERCE_ARRAY then COERCE_ENUM). + * valops.c (value_assign): Only do COERCE_ARRAY if internalvar (let + value_cast handle it otherwise); do *not* COERCE_ENUM either way. + * valarith.c: Use COERCE_NUMBER instead od COEREC_ARRAY. + Add COERCE_REF before COERCE_ENUM. + * values.c (value_as_long): Simplify. + + * valops.c (value_array): Create internalvar if !c_style_arrays. + * language.c (lang_bool_type): Add Fortran support. * eval.c (OP_BOOL): Use LA_BOOL_TYPE. diff --git a/gdb/values.c b/gdb/values.c index 76062bb201c..f95c831601d 100644 --- a/gdb/values.c +++ b/gdb/values.c @@ -556,8 +556,7 @@ value_as_long (val) /* This coerces arrays and functions, which is necessary (e.g. in disassemble_command). It also dereferences references, which I suspect is the most logical thing to do. */ - if (TYPE_CODE (VALUE_TYPE (val)) != TYPE_CODE_ENUM) - COERCE_ARRAY (val); + COERCE_ARRAY (val); return unpack_long (VALUE_TYPE (val), VALUE_CONTENTS (val)); }