* valops.c (search_struct_field): Also allow "else" as a variant name,
This commit is contained in:
parent
1293a6fc03
commit
4c2260aa5c
|
@ -1,5 +1,7 @@
|
||||||
Wed Sep 27 10:14:36 1995 Per Bothner <bothner@kalessin.cygnus.com>
|
Wed Sep 27 10:14:36 1995 Per Bothner <bothner@kalessin.cygnus.com>
|
||||||
|
|
||||||
|
* valops.c (search_struct_field): Also allow "else" as a variant name,
|
||||||
|
|
||||||
* eval.c (evaluate_struct_tuple): New function. Used to evaluate
|
* eval.c (evaluate_struct_tuple): New function. Used to evaluate
|
||||||
structure tuples. Now also handles Chill variant records.
|
structure tuples. Now also handles Chill variant records.
|
||||||
(get_label): New function, used by evaluate_struct_tuple.
|
(get_label): New function, used by evaluate_struct_tuple.
|
||||||
|
|
|
@ -1536,7 +1536,10 @@ search_struct_field (name, arg1, offset, type, looking_for_baseclass)
|
||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (t_field_name && t_field_name[0] == '\0')
|
if (t_field_name
|
||||||
|
&& (t_field_name[0] == '\0'
|
||||||
|
|| (TYPE_CODE (type) == TYPE_CODE_UNION
|
||||||
|
&& STREQ (t_field_name, "else"))))
|
||||||
{
|
{
|
||||||
struct type *field_type = TYPE_FIELD_TYPE (type, i);
|
struct type *field_type = TYPE_FIELD_TYPE (type, i);
|
||||||
if (TYPE_CODE (field_type) == TYPE_CODE_UNION
|
if (TYPE_CODE (field_type) == TYPE_CODE_UNION
|
||||||
|
|
Loading…
Reference in New Issue