diff options
author | Mike Stump <mrs@gcc.gnu.org> | 1993-09-22 18:43:15 +0000 |
---|---|---|
committer | Mike Stump <mrs@gcc.gnu.org> | 1993-09-22 18:43:15 +0000 |
commit | 33d7026fec4acb2e4675d207c1da9f8c166196ba (patch) | |
tree | 315a9449796a48cb4e770df71b8f04b012924412 /gcc | |
parent | c02bd5d96e33018e3eae39e69442437ad05bef39 (diff) | |
download | gcc-33d7026fec4acb2e4675d207c1da9f8c166196ba.zip gcc-33d7026fec4acb2e4675d207c1da9f8c166196ba.tar.gz gcc-33d7026fec4acb2e4675d207c1da9f8c166196ba.tar.bz2 |
cp-class.c (finish_struct): Move special C++ only code that handles anonymous unions inside structures here.
* cp-class.c (finish_struct): Move special C++ only code that
handles anonymous unions inside structures here.
* stor-layout.c (layout_record): From here.
From-SVN: r5403
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/stor-layout.c | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c index 5504678..0977b84 100644 --- a/gcc/stor-layout.c +++ b/gcc/stor-layout.c @@ -465,32 +465,6 @@ layout_record (rec) else DECL_FIELD_BITPOS (field) = size_int (const_size); - /* If this field is an anonymous union, - give each union-member the same position as the union has. - - ??? This is a real kludge because it makes the structure - of the types look strange. This feature is only used by - C++, which should have build_component_ref build two - COMPONENT_REF operations, one for the union and one for - the inner field. We set the offset of this field to zero - so that either the old or the correct method will work. - Setting DECL_FIELD_CONTEXT is wrong unless the inner fields are - moved into the type of this field, but nothing seems to break - by doing this. This kludge should be removed after 2.4. */ - - if (DECL_NAME (field) == 0 - && TREE_CODE (TREE_TYPE (field)) == UNION_TYPE) - { - tree uelt = TYPE_FIELDS (TREE_TYPE (field)); - for (; uelt; uelt = TREE_CHAIN (uelt)) - { - DECL_FIELD_CONTEXT (uelt) = DECL_FIELD_CONTEXT (field); - DECL_FIELD_BITPOS (uelt) = DECL_FIELD_BITPOS (field); - } - - DECL_FIELD_BITPOS (field) = integer_zero_node; - } - /* Now add size of this field to the size of the record. */ { |