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;
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++)
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;
}