When creating a new user defined type, check to see if a partial
type already exists, and if so, bash it to fit.
+Fri Feb 14 19:00:17 1992 John Gilmore (gnu at cygnus.com)
+
+ * coffread.c (decode_base_type): Pass long, not union.
+ Fix by Eric Valette, ev@chorus.fr.
+
Thu Feb 13 17:14:28 1992 Fred Fish (fnf at cygnus.com)
* elfread.c (elf_symtab_read): Fix code to correctly track
type = coff_alloc_type (cs->c_symnum);
TYPE_CODE (type) = TYPE_CODE_STRUCT;
TYPE_NAME (type) = concat ("struct ", "<opaque>", NULL);
- TYPE_CPLUS_SPECIFIC(type) = &cplus_struct_default;
+ INIT_CPLUS_SPECIFIC(type);
TYPE_LENGTH (type) = 0;
TYPE_FIELDS (type) = 0;
TYPE_NFIELDS (type) = 0;
{
type = read_struct_type (cs->c_symnum,
aux->x_sym.x_misc.x_lnsz.x_size,
- aux->x_sym.x_fcnary.x_fcn.x_endndx);
+ aux->x_sym.x_fcnary.x_fcn.x_endndx.l);
}
return type;
/* anonymous union type */
type = coff_alloc_type (cs->c_symnum);
TYPE_NAME (type) = concat ("union ", "<opaque>", NULL);
- TYPE_CPLUS_SPECIFIC(type) = &cplus_struct_default;
+ INIT_CPLUS_SPECIFIC(type);
TYPE_LENGTH (type) = 0;
TYPE_LENGTH (type) = 0;
TYPE_FIELDS (type) = 0;
{
type = read_struct_type (cs->c_symnum,
aux->x_sym.x_misc.x_lnsz.x_size,
- aux->x_sym.x_fcnary.x_fcn.x_endndx);
+ aux->x_sym.x_fcnary.x_fcn.x_endndx.l);
}
TYPE_CODE (type) = TYPE_CODE_UNION;
return type;
case T_ENUM:
return read_enum_type (cs->c_symnum,
aux->x_sym.x_misc.x_lnsz.x_size,
- aux->x_sym.x_fcnary.x_fcn.x_endndx);
+ aux->x_sym.x_fcnary.x_fcn.x_endndx.l);
case T_MOE:
/* shouldn't show up here */
type = coff_alloc_type (index);
TYPE_CODE (type) = TYPE_CODE_STRUCT;
- TYPE_CPLUS_SPECIFIC(type) = &cplus_struct_default;
+ INIT_CPLUS_SPECIFIC(type);
TYPE_LENGTH (type) = length;
while (!done && symnum < lastsym && symnum < nlist_nsyms_global)
/* Now fill in the fields of the type-structure. */
- /* FIXME: Should be sizeof (int) on target, not host. */
- TYPE_LENGTH (type) = sizeof (int);
+ TYPE_LENGTH (type) = TARGET_INT_BIT / TARGET_CHAR_BIT;
TYPE_CODE (type) = TYPE_CODE_ENUM;
TYPE_NFIELDS (type) = nsyms;
TYPE_FIELDS (type) = (struct field *)