aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>1992-11-23 22:43:24 +0000
committerRichard Stallman <rms@gnu.org>1992-11-23 22:43:24 +0000
commit35571e3830c9a9e2413ce199a5e8c20121f19f65 (patch)
treee3652a92d147026315f8b43a9d909499ab872c01
parent101e8cc174524b735b09bc2434d39ba197eb0b37 (diff)
downloadgcc-35571e3830c9a9e2413ce199a5e8c20121f19f65.zip
gcc-35571e3830c9a9e2413ce199a5e8c20121f19f65.tar.gz
gcc-35571e3830c9a9e2413ce199a5e8c20121f19f65.tar.bz2
(dbxout_type): Handle need for name of a RECORD_TYPE when it has none.
From-SVN: r2778
-rw-r--r--gcc/dbxout.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/dbxout.c b/gcc/dbxout.c
index 447546e..fe7887d 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;