* valops.c (search_struct_field): Also allow "else" as a variant name,
authorPer Bothner <per@bothner.com>
Wed, 27 Sep 1995 18:47:22 +0000 (18:47 +0000)
committerPer Bothner <per@bothner.com>
Wed, 27 Sep 1995 18:47:22 +0000 (18:47 +0000)
gdb/ChangeLog
gdb/valops.c

index fe104ce43a882f64fe2722e6911a952c0290b456..49ff54727cc6183f04e329940a8d2dc5301d16df 100644 (file)
@@ -1,5 +1,7 @@
 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
        structure tuples.  Now also handles Chill variant records.
        (get_label):  New function, used by evaluate_struct_tuple.
index 46a22a246ed4e34f1bd4a7e44803e35ba7b9261d..b4bfde848a2093e570675901f6f2bc1979bc9039 100644 (file)
@@ -1536,7 +1536,10 @@ search_struct_field (name, arg1, offset, type, looking_for_baseclass)
            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);
            if (TYPE_CODE (field_type) == TYPE_CODE_UNION
This page took 0.027938 seconds and 4 git commands to generate.