* values.c (value_primitive_field): If we're extracting a base

class, then the type of the result should be the base class being
extracted, not the type of which it is a base class.
This commit is contained in:
Jim Blandy 2001-05-21 20:08:59 +00:00
parent a44999d56d
commit 8d65888a44
2 changed files with 5 additions and 1 deletions

View file

@ -1,5 +1,9 @@
2001-05-21 Jim Blandy <jimb@redhat.com>
* values.c (value_primitive_field): If we're extracting a base
class, then the type of the result should be the base class being
extracted, not the type of which it is a base class.
* value.h (struct value): Doc fix, and rearrange members to place
them near their explanations.

View file

@ -856,7 +856,7 @@ value_primitive_field (register value_ptr arg1, int offset,
entire object's contents for later references to virtual
bases, etc. */
v = allocate_value (VALUE_ENCLOSING_TYPE (arg1));
VALUE_TYPE (v) = arg_type;
VALUE_TYPE (v) = type;
if (VALUE_LAZY (arg1))
VALUE_LAZY (v) = 1;
else