Remove IRIX 5 <sys/proc.h> _KMEMUSER workaround
[deliverable/binutils-gdb.git] / gdb / gdbtypes.c
index ab853d7849b0ca14d054029804c4bddbef3f1cc9..ad890ca0b22799b19e78e320fb6657bd2034610d 100644 (file)
@@ -2712,21 +2712,16 @@ set_type_code (struct type *type, enum type_code code)
 static int
 verify_floatformat (int bit, const struct floatformat **floatformats)
 {
+  gdb_assert (floatformats != NULL);
+  gdb_assert (floatformats[0] != NULL && floatformats[1] != NULL);
+
   if (bit == -1)
-    {
-      gdb_assert (floatformats != NULL);
-      gdb_assert (floatformats[0] != NULL && floatformats[1] != NULL);
-      bit = floatformats[0]->totalsize;
-    }
+    bit = floatformats[0]->totalsize;
   gdb_assert (bit >= 0);
 
-  if (floatformats != NULL)
-    {
-      size_t len = bit / TARGET_CHAR_BIT;
-
-      gdb_assert (len >= floatformat_totalsize_bytes (floatformats[0]));
-      gdb_assert (len >= floatformat_totalsize_bytes (floatformats[1]));
-    }
+  size_t len = bit / TARGET_CHAR_BIT;
+  gdb_assert (len >= floatformat_totalsize_bytes (floatformats[0]));
+  gdb_assert (len >= floatformat_totalsize_bytes (floatformats[1]));
 
   return bit;
 }
@@ -2748,11 +2743,6 @@ init_type (struct objfile *objfile, enum type_code code, int length,
   TYPE_LENGTH (type) = length;
   TYPE_NAME (type) = name;
 
-  /* C++ fancies.  */
-
-  if (name && strcmp (name, "char") == 0)
-    TYPE_NOSIGN (type) = 1;
-
   return type;
 }
 
@@ -4780,8 +4770,6 @@ arch_integer_type (struct gdbarch *gdbarch,
   t = arch_type (gdbarch, TYPE_CODE_INT, bit / TARGET_CHAR_BIT, name);
   if (unsigned_p)
     TYPE_UNSIGNED (t) = 1;
-  if (name && strcmp (name, "char") == 0)
-    TYPE_NOSIGN (t) = 1;
 
   return t;
 }
@@ -5046,6 +5034,7 @@ gdbtypes_post_init (struct gdbarch *gdbarch)
   builtin_type->builtin_char
     = arch_integer_type (gdbarch, TARGET_CHAR_BIT,
                         !gdbarch_char_signed (gdbarch), "char");
+  TYPE_NOSIGN (builtin_type->builtin_char) = 1;
   builtin_type->builtin_signed_char
     = arch_integer_type (gdbarch, TARGET_CHAR_BIT,
                         0, "signed char");
@@ -5193,6 +5182,7 @@ objfile_type (struct objfile *objfile)
   objfile_type->builtin_char
     = init_integer_type (objfile, TARGET_CHAR_BIT,
                         !gdbarch_char_signed (gdbarch), "char");
+  TYPE_NOSIGN (objfile_type->builtin_char) = 1;
   objfile_type->builtin_signed_char
     = init_integer_type (objfile, TARGET_CHAR_BIT,
                         0, "signed char");
This page took 0.025926 seconds and 4 git commands to generate.