use remote-utils facilities for baud_rate
[deliverable/binutils-gdb.git] / gdb / gdbtypes.c
index bc7e2576ac5317dc75904ca116e7a7e90c51b929..c6e41f349e102e6606eaf932a8f55e2ff56b7e21 100644 (file)
@@ -684,7 +684,6 @@ lookup_struct_elt_type (type, name, noerr)
     int noerr;
 {
   int i;
-  char *typename;
 
   if (TYPE_CODE (type) == TYPE_CODE_PTR ||
       TYPE_CODE (type) == TYPE_CODE_REF)
@@ -707,9 +706,13 @@ lookup_struct_elt_type (type, name, noerr)
      the structure tag name is the same as the member name.  I.E. when doing
      "ptype bell->bar" for "struct foo { int bar; int foo; } bell;"
      Disabled by fnf. */
-  typename = type_name_no_tag (type);
-  if (typename != NULL && STREQ (typename, name))
-    return type;
+  {
+    char *typename;
+
+    typename = type_name_no_tag (type);
+    if (typename != NULL && STREQ (typename, name))
+      return type;
+  }
 #endif
 
   for (i = TYPE_NFIELDS (type) - 1; i >= TYPE_N_BASECLASSES (type); i--)
@@ -805,6 +808,10 @@ check_stub_type (type)
   if (TYPE_FLAGS(type) & TYPE_FLAG_STUB)
     {
       char* name = type_name_no_tag (type);
+      /* FIXME: shouldn't we separately check the TYPE_NAME and the
+        TYPE_TAG_NAME, and look in STRUCT_NAMESPACE and/or VAR_NAMESPACE
+        as appropriate?  (this code was written before TYPE_NAME and
+        TYPE_TAG_NAME were separate).  */
       struct symbol *sym;
       if (name == NULL)
        {
This page took 0.023281 seconds and 4 git commands to generate.