* stabsread.c (read_struct_type): Trivial simplification.
authorPer Bothner <per@bothner.com>
Fri, 12 Jan 1996 07:12:42 +0000 (07:12 +0000)
committerPer Bothner <per@bothner.com>
Fri, 12 Jan 1996 07:12:42 +0000 (07:12 +0000)
* valops.c (call_function_by_hand):  Use invisible references
for TYPE_CODE_SET and TYPE_CODE_BITSTRING too.

gdb/ChangeLog
gdb/stabsread.c
gdb/valops.c

index ea3ed7b2f9d68aec70df3dd4b9976720e881611d..99a3767d6a6caac6e0f210391651e851bd8998b3 100644 (file)
@@ -1,7 +1,10 @@
 Thu Jan 11 17:21:25 1996  Per Bothner  <bothner@kalessin.cygnus.com>
 
+       * stabsread.c (read_struct_type):  Trivial simplification.
+
        * stabsread.c (define-symbol):  Use invisible references
        for TYPE_CODE_SET and TYPE_CODE_BITSTRING too.
+       * valops.c (call_function_by_hand):  Likewise.
        * eval.c (evaluate_subexp_standard):  When known, use the formal
        parameter type as the expected type when evaluating arg expressions.
        * ch-lang.c (evaluate_subexp_chill):  Likewise (for MULTI_SUBSCRIPT).
index c81b21e5f5ef57edd4196bc42b23b6628aac5269..ba36fb26196e0631718e624190a54192236c04d5 100644 (file)
@@ -2967,8 +2967,7 @@ read_struct_type (pp, type, objfile)
       || !attach_fn_fields_to_type (&fi, type)
       || !read_tilde_fields (&fi, pp, type, objfile))
     {
-      do_cleanups (back_to);
-      return (error_type (pp, objfile));
+      type = error_type (pp, objfile);
     }
 
   do_cleanups (back_to);
index 6e6eae095e3408fa5ed75b98d442be08bb6c334b..046d21388735148f0f8022c96108b868bfdc9e06 100644 (file)
@@ -187,11 +187,11 @@ value_cast (type, arg2)
   COERCE_VARYING_ARRAY (arg2, type2);
   code2 = TYPE_CODE (type2);
 
-  if (code1 == TYPE_CODE_COMPLEX) 
-    return cast_into_complex (type, arg2); 
-  if (code1 == TYPE_CODE_BOOL
+  if (code1 == TYPE_CODE_COMPLEX)
+    return cast_into_complex (type, arg2);
+  if (code1 == TYPE_CODE_BOOL || code1 == TYPE_CODE_CHAR)
     code1 = TYPE_CODE_INT; 
-  if (code2 == TYPE_CODE_BOOL
+  if (code2 == TYPE_CODE_BOOL || code2 == TYPE_CODE_CHAR)
     code2 = TYPE_CODE_INT;
 
   scalar = (code2 == TYPE_CODE_INT || code2 == TYPE_CODE_FLT
@@ -1137,7 +1137,9 @@ call_function_by_hand (function, nargs, args)
        if ((TYPE_CODE (arg_type) == TYPE_CODE_STRUCT
             || TYPE_CODE (arg_type) == TYPE_CODE_UNION
             || TYPE_CODE (arg_type) == TYPE_CODE_ARRAY
-            || TYPE_CODE (arg_type) == TYPE_CODE_STRING)
+            || TYPE_CODE (arg_type) == TYPE_CODE_STRING
+            || TYPE_CODE (arg_type) == TYPE_CODE_BITSTRING
+            || TYPE_CODE (arg_type) == TYPE_CODE_SET)
          && REG_STRUCT_HAS_ADDR (using_gcc, arg_type))
          {
            CORE_ADDR addr;