diff options
author | Per Bothner <bothner@gcc.gnu.org> | 1994-02-11 18:52:08 -0800 |
---|---|---|
committer | Per Bothner <bothner@gcc.gnu.org> | 1994-02-11 18:52:08 -0800 |
commit | 5b6e175e295c34e21b6498e2d0310cfa15fb6797 (patch) | |
tree | 8d44ade096c16cf8ed830d9dda545204a37f958e /gcc | |
parent | 2d4ffae31a0b2f7842d2388416766c2eb8a1701d (diff) | |
download | gcc-5b6e175e295c34e21b6498e2d0310cfa15fb6797.zip gcc-5b6e175e295c34e21b6498e2d0310cfa15fb6797.tar.gz gcc-5b6e175e295c34e21b6498e2d0310cfa15fb6797.tar.bz2 |
Don't treat anonymous fields as belonging to the containing object.
From-SVN: r6537
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/dbxout.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/gcc/dbxout.c b/gcc/dbxout.c index 44d8b8e..2517e69 100644 --- a/gcc/dbxout.c +++ b/gcc/dbxout.c @@ -581,14 +581,8 @@ dbxout_type_fields (type) field. */ for (tem = TYPE_FIELDS (type); tem; tem = TREE_CHAIN (tem)) { - /* For nameless subunions and subrecords, treat their fields as ours. */ - if (DECL_NAME (tem) == NULL_TREE - && (TREE_CODE (TREE_TYPE (tem)) == UNION_TYPE - || TREE_CODE (TREE_TYPE (tem)) == QUAL_UNION_TYPE - || TREE_CODE (TREE_TYPE (tem)) == RECORD_TYPE)) - dbxout_type_fields (TREE_TYPE (tem)); /* Omit here local type decls until we know how to support them. */ - else if (TREE_CODE (tem) == TYPE_DECL) + if (TREE_CODE (tem) == TYPE_DECL) continue; /* Omit fields whose position or size are variable. */ else if (TREE_CODE (tem) == FIELD_DECL @@ -596,7 +590,7 @@ dbxout_type_fields (type) || TREE_CODE (DECL_SIZE (tem)) != INTEGER_CST)) continue; /* Omit here the nameless fields that are used to skip bits. */ - else if (DECL_NAME (tem) != 0 && TREE_CODE (tem) != CONST_DECL) + else if (TREE_CODE (tem) != CONST_DECL) { /* Continue the line if necessary, but not before the first field. */ @@ -620,8 +614,16 @@ dbxout_type_fields (type) continue; } - fprintf (asmfile, "%s:", IDENTIFIER_POINTER (DECL_NAME (tem))); - CHARS (2 + IDENTIFIER_LENGTH (DECL_NAME (tem))); + if (DECL_NAME (tem)) + { + fprintf (asmfile, "%s:", IDENTIFIER_POINTER (DECL_NAME (tem))); + CHARS (2 + IDENTIFIER_LENGTH (DECL_NAME (tem))); + } + else + { + fprintf (asmfile, ":"); + CHARS (2); + } if (use_gnu_debug_info_extensions && (TREE_PRIVATE (tem) || TREE_PROTECTED (tem) |