add MEM_FNS_DECLARED
[deliverable/binutils-gdb.git] / gdb / stabsread.c
index 06b61ece81efd0505d5ac9f5ef35e6497436762e..532154ef1077502ed94070c825b34b0810628c04 100644 (file)
@@ -1158,8 +1158,7 @@ read_type (pp, objfile)
     case '#':                          /* Method (class & fn) type */
       if ((*pp)[0] == '#')
        {
-         /* This "minimized" format bogus, because it doesn't yield
-            enough information.  I've changed gcc to not emit it.  --Per */
+         /* We'll get the parameter types from the name.  */
          struct type *return_type;
 
          *pp += 1;
@@ -1328,8 +1327,21 @@ read_struct_type (pp, type, objfile)
       ALLOCATE_CPLUS_STRUCT_TYPE(type);
 
       n_baseclasses = read_number (pp, ',');
+      /* Some stupid compilers have trouble with the following, so break
+        it up into simpler expressions.  */
+#if 0
       TYPE_FIELD_VIRTUAL_BITS (type) = (B_TYPE *)
        TYPE_ALLOC (type, B_BYTES (n_baseclasses));
+#else
+      {
+       int num_bytes = B_BYTES (n_baseclasses);
+       char *pointer;
+       
+       pointer = (char *) TYPE_ALLOC (type, num_bytes);
+       TYPE_FIELD_VIRTUAL_BITS (type) = (B_TYPE *) pointer;
+      }
+#endif /* 0 */
+
       B_CLRALL (TYPE_FIELD_VIRTUAL_BITS (type), n_baseclasses);
 
       for (i = 0; i < n_baseclasses; i++)
@@ -1508,26 +1520,21 @@ read_struct_type (pp, type, objfile)
       if (**pp == ':')
        {
          p = ++(*pp);
+#if 0
+         /* Possible future hook for nested types. */
          if (**pp == '!')
-           { /* C++ nested type -as in FOO::BAR */
-             list->field.bitpos = (long)(-2); /* nested type */
+           {
+             list->field.bitpos = (long)-2; /* nested type */
              p = ++(*pp);
-             if (TYPE_NAME (list->field.type) == NULL && **pp == '\'')
-               {
-                 for (p = ++(*pp); *p != '\''; ) p++;
-                 TYPE_NAME (list->field.type) = savestring (*pp, p - *pp);
-               }
-             while (*p != ';') p++;
-             list->field.bitsize = 0;
-             *pp = p + 1;
            }
          else
+#endif
            { /* Static class member.  */
-             list->field.bitpos = (long)(-1);
-             while (*p != ';') p++;
-             list->field.bitsize = (long) savestring (*pp, p - *pp);
-             *pp = p + 1;
+             list->field.bitpos = (long)-1;
            }
+         while (*p != ';') p++;
+         list->field.bitsize = (long) savestring (*pp, p - *pp);
+         *pp = p + 1;
          nfields++;
          continue;
        }
This page took 0.024322 seconds and 4 git commands to generate.