From 35571e3830c9a9e2413ce199a5e8c20121f19f65 Mon Sep 17 00:00:00 2001 From: Richard Stallman Date: Mon, 23 Nov 1992 22:43:24 +0000 Subject: [PATCH] (dbxout_type): Handle need for name of a RECORD_TYPE when it has none. From-SVN: r2778 --- gcc/dbxout.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gcc/dbxout.c b/gcc/dbxout.c index 447546e4ac3..fe7887d3bf7 100644 --- a/gcc/dbxout.c +++ b/gcc/dbxout.c @@ -854,6 +854,7 @@ dbxout_type (type, full, show_arg_types) int show_arg_types; { register tree tem; + static int anonymous_type_number = 0; /* If there was an input error and we don't really have a type, avoid crashing and write something that is at least valid @@ -1081,7 +1082,10 @@ dbxout_type (type, full, show_arg_types) if (TREE_CODE (TYPE_NAME (type)) != IDENTIFIER_NODE) abort (); #endif - dbxout_type_name (type); + if (TYPE_NAME (type) != 0) + dbxout_type_name (type); + else + fprintf (asmfile, "$$%d", anonymous_type_number++); fprintf (asmfile, ":"); typevec[TYPE_SYMTAB_ADDRESS (type)] = TYPE_XREF; break; -- 2.30.2