2010-05-27 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
[binutils-gdb.git] / gdb / language.c
index dcd70b09147c10a5959a06ec9d28e10383d93eb4..c20d7c0eccfd796a2726678d048ef84f2fb8a27a 100644 (file)
@@ -486,6 +486,7 @@ binop_result_type (struct value *v1, struct value *v2)
     {
     case language_c:
     case language_cplus:
+    case language_d:
     case language_objc:
       if (TYPE_CODE (t1) == TYPE_CODE_FLT)
        return TYPE_CODE (t2) == TYPE_CODE_FLT && l2 > l1 ?
@@ -597,6 +598,7 @@ integral_type (struct type *type)
     {
     case language_c:
     case language_cplus:
+    case language_d:
     case language_objc:
       return (TYPE_CODE (type) != TYPE_CODE_INT) &&
        (TYPE_CODE (type) != TYPE_CODE_ENUM) ? 0 : 1;
@@ -637,6 +639,7 @@ character_type (struct type *type)
 
     case language_c:
     case language_cplus:
+    case language_d:
     case language_objc:
       return (TYPE_CODE (type) == TYPE_CODE_INT) &&
        TYPE_LENGTH (type) == sizeof (char)
@@ -659,6 +662,7 @@ string_type (struct type *type)
 
     case language_c:
     case language_cplus:
+    case language_d:
     case language_objc:
       /* C does not have distinct string type. */
       return (0);
@@ -678,6 +682,7 @@ boolean_type (struct type *type)
     {
     case language_c:
     case language_cplus:
+    case language_d:
     case language_objc:
       /* Might be more cleanly handled by having a
          TYPE_CODE_INT_NOT_BOOL for (the deleted) CHILL and such
@@ -717,6 +722,7 @@ structured_type (struct type *type)
     {
     case language_c:
     case language_cplus:
+    case language_d:
     case language_objc:
       return (TYPE_CODE (type) == TYPE_CODE_STRUCT) ||
        (TYPE_CODE (type) == TYPE_CODE_UNION) ||
@@ -767,8 +773,8 @@ void
 type_error (const char *string,...)
 {
   va_list args;
-  va_start (args, string);
 
+  va_start (args, string);
   switch (type_check)
     {
     case type_check_warn:
@@ -793,8 +799,8 @@ void
 range_error (const char *string,...)
 {
   va_list args;
-  va_start (args, string);
 
+  va_start (args, string);
   switch (range_check)
     {
     case range_check_warn:
@@ -975,6 +981,7 @@ skip_language_trampoline (struct frame_info *frame, CORE_ADDR pc)
       if (languages[i]->skip_trampoline)
        {
          CORE_ADDR real_pc = (languages[i]->skip_trampoline) (frame, pc);
+
          if (real_pc)
            return real_pc;
        }
@@ -1292,6 +1299,7 @@ language_string_char_type (const struct language_defn *la,
 {
   struct language_gdbarch *ld = gdbarch_data (gdbarch,
                                              language_gdbarch_data);
+
   return ld->arch_info[la->la_language].string_char_type;
 }
 
@@ -1305,11 +1313,13 @@ language_bool_type (const struct language_defn *la,
   if (ld->arch_info[la->la_language].bool_type_symbol)
     {
       struct symbol *sym;
+
       sym = lookup_symbol (ld->arch_info[la->la_language].bool_type_symbol,
                           NULL, VAR_DOMAIN, NULL);
       if (sym)
        {
          struct type *type = SYMBOL_TYPE (sym);
+
          if (type && TYPE_CODE (type) == TYPE_CODE_BOOL)
            return type;
        }
@@ -1326,6 +1336,7 @@ language_lookup_primitive_type_by_name (const struct language_defn *la,
   struct language_gdbarch *ld = gdbarch_data (gdbarch,
                                              language_gdbarch_data);
   struct type *const *p;
+
   for (p = ld->arch_info[la->la_language].primitive_type_vector;
        (*p) != NULL;
        p++)