Fix compile time warning messages.
[deliverable/binutils-gdb.git] / gdb / gdbtypes.c
index 0d5bee84489df6b126f2ff077b70f3651c9846c2..0f6eef915c55e6afc95e567904fe6f35015f1aec 100644 (file)
@@ -84,16 +84,16 @@ struct extra
     int len;
   };                           /* maximum extention is 128! FIXME */
 
-static void add_name PARAMS ((struct extra *, char *));
-static void add_mangled_type PARAMS ((struct extra *, struct type *));
+static void add_name (struct extra *, char *);
+static void add_mangled_type (struct extra *, struct type *);
 #if 0
-static void cfront_mangle_name PARAMS ((struct type *, int, int));
+static void cfront_mangle_name (struct type *, int, int);
 #endif
-static void print_bit_vector PARAMS ((B_TYPE *, int));
-static void print_arg_types PARAMS ((struct type **, int));
-static void dump_fn_fieldlists PARAMS ((struct type *, int));
-static void print_cplus_stuff PARAMS ((struct type *, int));
-static void virtual_base_list_aux PARAMS ((struct type * dclass));
+static void print_bit_vector (B_TYPE *, int);
+static void print_arg_types (struct type **, int);
+static void dump_fn_fieldlists (struct type *, int);
+static void print_cplus_stuff (struct type *, int);
+static void virtual_base_list_aux (struct type *dclass);
 
 
 /* Alloc a new type structure and fill it with some defaults.  If
@@ -1484,11 +1484,11 @@ check_stub_method (type, method_id, signature_id)
   argtypetext = p;
   while (*p)
     {
-      if (*p == '(')
+      if (*p == '(' || *p == '<')
        {
          depth += 1;
        }
-      else if (*p == ')')
+      else if (*p == ')' || *p == '>')
        {
          depth -= 1;
        }
@@ -1527,11 +1527,11 @@ check_stub_method (type, method_id, signature_id)
              argtypetext = p + 1;
            }
 
-         if (*p == '(')
+         if (*p == '(' || *p == '<')
            {
              depth += 1;
            }
-         else if (*p == ')')
+         else if (*p == ')' || *p == '>')
            {
              depth -= 1;
            }
@@ -2199,6 +2199,16 @@ rank_one_type (parm, arg)
   if (TYPE_CODE (arg) == TYPE_CODE_TYPEDEF)
     arg = check_typedef (arg);
 
+  /*
+     Well, damnit, if the names are exactly the same,
+     i'll say they are exactly the same. This happens when we generate
+     method stubs. The types won't point to the same address, but they
+     really are the same.
+  */
+
+  if (TYPE_NAME (parm) == TYPE_NAME (arg))
+      return 0;
+
   /* Check if identical after resolving typedefs */
   if (parm == arg)
     return 0;
@@ -2875,7 +2885,7 @@ recursive_dump_type (type, spaces)
     obstack_free (&dont_print_type_obstack, NULL);
 }
 
-static void build_gdbtypes PARAMS ((void));
+static void build_gdbtypes (void);
 static void
 build_gdbtypes ()
 {
@@ -3035,7 +3045,7 @@ build_gdbtypes ()
 }
 
 
-extern void _initialize_gdbtypes PARAMS ((void));
+extern void _initialize_gdbtypes (void);
 void
 _initialize_gdbtypes ()
 {
This page took 0.05703 seconds and 4 git commands to generate.