aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>1992-09-25 06:26:22 +0000
committerRichard Stallman <rms@gnu.org>1992-09-25 06:26:22 +0000
commit3b6c7a7df89ca8deb7509311e8b9c3c4d883a3eb (patch)
tree8a3abe3d0d15844d4d3e28457ea07930618107ee /gcc
parentf979c996cd8307d2273ae258ab9372c3fd98358c (diff)
downloadgcc-3b6c7a7df89ca8deb7509311e8b9c3c4d883a3eb.zip
gcc-3b6c7a7df89ca8deb7509311e8b9c3c4d883a3eb.tar.gz
gcc-3b6c7a7df89ca8deb7509311e8b9c3c4d883a3eb.tar.bz2
(dbxout_symbol): For anonymous enum, output type anyway.
From-SVN: r2246
Diffstat (limited to 'gcc')
-rw-r--r--gcc/dbxout.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/dbxout.c b/gcc/dbxout.c
index ba1a550..94fb6ca 100644
--- a/gcc/dbxout.c
+++ b/gcc/dbxout.c
@@ -1445,6 +1445,7 @@ dbxout_symbol (decl, local)
{
int tag_needed = 1;
+ int did_output = 0;
if (DECL_NAME (decl))
{
@@ -1504,6 +1505,7 @@ dbxout_symbol (decl, local)
dbxout_type (type, 1, 0);
dbxout_finish_symbol (decl);
+ did_output = 1;
}
if (tag_needed && TYPE_NAME (type) != 0
@@ -1527,6 +1529,22 @@ dbxout_symbol (decl, local)
IDENTIFIER_POINTER (name));
dbxout_type (type, 1, 0);
dbxout_finish_symbol (NULL_TREE);
+ did_output = 1;
+ }
+
+ /* If an enum type has no name, it cannot be referred to,
+ but we must output it anyway, since the enumeration constants
+ can be referred to. */
+ if (!did_output && TREE_CODE (type) == ENUMERAL_TYPE)
+ {
+ current_sym_code = DBX_TYPE_DECL_STABS_CODE;
+ current_sym_value = 0;
+ current_sym_addr = 0;
+ current_sym_nchars = 2;
+
+ fprintf (asmfile, "%s \":T", ASM_STABS_OP);
+ dbxout_type (type, 1, 0);
+ dbxout_finish_symbol (NULL_TREE);
}
/* Prevent duplicate output of a typedef. */