language.c (binop_result_type): Add language_objc to case.
[binutils-gdb.git] / gdb / language.c
index 9cbb31761aae0bbe9b347d089c514e60790b3299..8eee8f6d4a56ca7429d48fe73e432aab8ca83feb 100644 (file)
@@ -549,6 +549,7 @@ binop_result_type (struct value *v1, struct value *v2)
     {
     case language_c:
     case language_cplus:
+    case language_objc:
       if (TYPE_CODE (t1) == TYPE_CODE_FLT)
        return TYPE_CODE (t2) == TYPE_CODE_FLT && l2 > l1 ?
          VALUE_TYPE (v2) : VALUE_TYPE (v1);
@@ -567,8 +568,8 @@ binop_result_type (struct value *v1, struct value *v2)
          not needed. */
       return l1 > l2 ? VALUE_TYPE (v1) : VALUE_TYPE (v2);
       break;
-    case language_chill:
-      error ("Missing Chill support in function binop_result_check."); /*FIXME */
+      /* OBSOLETE case language_chill: */
+      /* OBSOLETE    error ("Missing Chill support in function binop_result_check.");  */      /*FIXME */
     }
   internal_error (__FILE__, __LINE__, "failed internal consistency check");
   return (struct type *) 0;    /* For lint */
@@ -786,13 +787,14 @@ integral_type (struct type *type)
     {
     case language_c:
     case language_cplus:
+    case language_objc:
       return (TYPE_CODE (type) != TYPE_CODE_INT) &&
        (TYPE_CODE (type) != TYPE_CODE_ENUM) ? 0 : 1;
     case language_m2:
     case language_pascal:
       return TYPE_CODE (type) != TYPE_CODE_INT ? 0 : 1;
-    case language_chill:
-      error ("Missing Chill support in function integral_type.");      /*FIXME */
+      /* OBSOLETE case language_chill: */
+      /* OBSOLETE   error ("Missing Chill support in function integral_type.");        *//*FIXME */
     default:
       error ("Language not supported.");
     }
@@ -821,13 +823,14 @@ character_type (struct type *type)
   CHECK_TYPEDEF (type);
   switch (current_language->la_language)
     {
-    case language_chill:
+      /* OBSOLETE case language_chill: */
     case language_m2:
     case language_pascal:
       return TYPE_CODE (type) != TYPE_CODE_CHAR ? 0 : 1;
 
     case language_c:
     case language_cplus:
+    case language_objc:
       return (TYPE_CODE (type) == TYPE_CODE_INT) &&
        TYPE_LENGTH (type) == sizeof (char)
       ? 1 : 0;
@@ -843,13 +846,14 @@ string_type (struct type *type)
   CHECK_TYPEDEF (type);
   switch (current_language->la_language)
     {
-    case language_chill:
+      /* OBSOLETE case language_chill: */
     case language_m2:
     case language_pascal:
       return TYPE_CODE (type) != TYPE_CODE_STRING ? 0 : 1;
 
     case language_c:
     case language_cplus:
+    case language_objc:
       /* C does not have distinct string type. */
       return (0);
     default:
@@ -868,8 +872,10 @@ boolean_type (struct type *type)
     {
     case language_c:
     case language_cplus:
-      /* Might be more cleanly handled by having a TYPE_CODE_INT_NOT_BOOL
-         for CHILL and such languages, or a TYPE_CODE_INT_OR_BOOL for C.  */
+    case language_objc:
+      /* Might be more cleanly handled by having a
+         TYPE_CODE_INT_NOT_BOOL for (OBSOLETE) CHILL and such
+         languages, or a TYPE_CODE_INT_OR_BOOL for C.  */
       if (TYPE_CODE (type) == TYPE_CODE_INT)
        return 1;
     default:
@@ -903,6 +909,7 @@ structured_type (struct type *type)
     {
     case language_c:
     case language_cplus:
+    case language_objc:
       return (TYPE_CODE (type) == TYPE_CODE_STRUCT) ||
        (TYPE_CODE (type) == TYPE_CODE_UNION) ||
        (TYPE_CODE (type) == TYPE_CODE_ARRAY);
@@ -915,8 +922,8 @@ structured_type (struct type *type)
       return (TYPE_CODE (type) == TYPE_CODE_STRUCT) ||
        (TYPE_CODE (type) == TYPE_CODE_SET) ||
        (TYPE_CODE (type) == TYPE_CODE_ARRAY);
-    case language_chill:
-      error ("Missing Chill support in function structured_type.");    /*FIXME */
+      /* OBSOLETE case language_chill: */
+      /* OBSOLETE     error ("Missing Chill support in function structured_type.");    *//*FIXME */
     default:
       return (0);
     }
@@ -930,8 +937,10 @@ lang_bool_type (void)
   struct type *type;
   switch (current_language->la_language)
     {
-    case language_chill:
-      return builtin_type_chill_bool;
+#if 0
+      /* OBSOLETE case language_chill: */
+      /* OBSOLETE    return builtin_type_chill_bool; */
+#endif
     case language_fortran:
       sym = lookup_symbol ("logical", NULL, VAR_NAMESPACE, NULL, NULL);
       if (sym)
@@ -1121,6 +1130,7 @@ binop_type_check (struct value *arg1, struct value *arg2, int op)
 #ifdef _LANG_c
        case language_c:
        case language_cplus:
+       case language_objc:
          switch (op)
            {
            case BINOP_DIV:
@@ -1161,9 +1171,9 @@ binop_type_check (struct value *arg1, struct value *arg2, int op)
         }
 #endif
 
-#ifdef _LANG_chill
-       case language_chill:
-         error ("Missing Chill support in function binop_type_check.");        /*FIXME */
+#ifdef _LANG_chill /* OBSOLETE */
+        /* OBSOLETE case language_chill: */
+        /* OBSOLETE   error ("Missing Chill support in function binop_type_check.");   *//*FIXME */
 #endif
 
        }