2004-01-27 Jim Blandy * stabsread.c (read_type): If we find any type numbers that are forward references, complain if the references aren't resolved by the time we're finished reading. (cleanup_undefined_types): Make error message more appropriate for a complaint. Index: gdb/stabsread.c =================================================================== RCS file: /cvs/src/src/gdb/stabsread.c,v retrieving revision 1.72 diff -c -r1.72 stabsread.c *** gdb/stabsread.c 19 Jan 2004 01:20:11 -0000 1.72 --- gdb/stabsread.c 28 Jan 2004 05:39:16 -0000 *************** *** 1446,1456 **** if (read_type_number (pp, typenums) != 0) return error_type (pp, objfile); - /* Type is not being defined here. Either it already exists, - or this is a forward reference to it. dbx_alloc_type handles - both cases. */ if (**pp != '=') ! return dbx_alloc_type (typenums, objfile); /* Type is being defined here. */ /* Skip the '='. --- 1446,1466 ---- if (read_type_number (pp, typenums) != 0) return error_type (pp, objfile); if (**pp != '=') ! { ! /* Type is not being defined here. Either it already ! exists, or this is a forward reference to it. ! dbx_alloc_type handles both cases. */ ! type = dbx_alloc_type (typenums, objfile); ! ! /* If this is a forward reference, arrange to complain if it ! doesn't get patched up by the time we're done ! reading. */ ! if (TYPE_CODE (type) == TYPE_CODE_UNDEF) ! add_undefined_type (type); ! ! return type; ! } /* Type is being defined here. */ /* Skip the '='. *************** *** 4197,4203 **** default: { complaint (&symfile_complaints, ! "GDB internal error. cleanup_undefined_types with bad type %d.", TYPE_CODE (*type)); } break; --- 4207,4214 ---- default: { complaint (&symfile_complaints, ! "forward-referenced types left unresolved, " ! "type code %d.", TYPE_CODE (*type)); } break;