aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJason Merrill <jason@gcc.gnu.org>1999-10-07 20:08:23 -0400
committerJason Merrill <jason@gcc.gnu.org>1999-10-07 20:08:23 -0400
commit11028a5379153307e5eef4b71b836e41b11551c6 (patch)
treed50a15941564c628c564a66f8e40867e6c137f53 /gcc
parent45df36631616b48cde09691a9f4cfc23e6511ef1 (diff)
downloadgcc-11028a5379153307e5eef4b71b836e41b11551c6.zip
gcc-11028a5379153307e5eef4b71b836e41b11551c6.tar.gz
gcc-11028a5379153307e5eef4b71b836e41b11551c6.tar.bz2
class.c (build_vtable_entry_ref): Use finish_asm_stmt.
* class.c (build_vtable_entry_ref): Use finish_asm_stmt. * class.c (finish_struct_1): Use simpler method of removing elements of a singly-linked list which doesn't lose for classes without data members. From-SVN: r29859
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog10
-rw-r--r--gcc/cp/class.c26
2 files changed, 22 insertions, 14 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 526edb1..45bde39 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,13 @@
+1999-10-07 Jason Merrill <jason@yorick.cygnus.com>
+
+ * class.c (build_vtable_entry_ref): Use finish_asm_stmt.
+
+1999-10-07 Greg McGary <gkm@gnu.org>
+
+ * class.c (finish_struct_1): Use simpler method of
+ removing elements of a singly-linked list which doesn't
+ lose for classes without data members.
+
1999-10-07 Mark Mitchell <mark@codesourcery.com>
* friend.c (make_friend_class): Robustify.
diff --git a/gcc/cp/class.c b/gcc/cp/class.c
index dc40536..c9281d7 100644
--- a/gcc/cp/class.c
+++ b/gcc/cp/class.c
@@ -32,6 +32,7 @@ Boston, MA 02111-1307, USA. */
#include "toplev.h"
#include "splay-tree.h"
#include "ggc.h"
+#include "lex.h"
#include "obstack.h"
#define obstack_chunk_alloc xmalloc
@@ -465,8 +466,9 @@ build_vtable_entry_ref (basetype, vtbl, idx)
i = build_binary_op (MINUS_EXPR, i, i2);
i = build_tree_list (build_string (1, "i"), i);
- expand_asm_operands (build_string (sizeof(asm_stmt)-1, asm_stmt),
- NULL_TREE, chainon (s, i), NULL_TREE, 1, NULL, 0);
+ finish_asm_stmt (ridpointers[RID_VOLATILE],
+ build_string (sizeof(asm_stmt)-1, asm_stmt),
+ NULL_TREE, chainon (s, i), NULL_TREE);
}
/* Given an object INSTANCE, return an expression which yields the
@@ -3860,19 +3862,15 @@ finish_struct_1 (t)
my_friendly_assert (TYPE_FIELDS (t) == fields, 981117);
- /* Delete all zero-width bit-fields from the front of the fieldlist */
- while (fields && DECL_C_BIT_FIELD (fields)
- && DECL_INITIAL (fields))
- fields = TREE_CHAIN (fields);
- /* Delete all such fields from the rest of the fields. */
- for (x = fields; x;)
- {
- if (TREE_CHAIN (x) && DECL_C_BIT_FIELD (TREE_CHAIN (x))
- && DECL_INITIAL (TREE_CHAIN (x)))
- TREE_CHAIN (x) = TREE_CHAIN (TREE_CHAIN (x));
+ /* Delete all zero-width bit-fields from the fieldlist */
+ {
+ tree *fieldsp = &fields;
+ while (*fieldsp && TREE_CODE (*fieldsp) == FIELD_DECL)
+ if (DECL_C_BIT_FIELD (*fieldsp) && DECL_INITIAL (*fieldsp))
+ *fieldsp = TREE_CHAIN (*fieldsp);
else
- x = TREE_CHAIN (x);
- }
+ fieldsp = &TREE_CHAIN (*fieldsp);
+ }
TYPE_FIELDS (t) = fields;
if (TYPE_USES_VIRTUAL_BASECLASSES (t))