Commit 11028a53 by Jason Merrill

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
parent 45df3663
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> 1999-10-07 Mark Mitchell <mark@codesourcery.com>
* friend.c (make_friend_class): Robustify. * friend.c (make_friend_class): Robustify.
......
...@@ -32,6 +32,7 @@ Boston, MA 02111-1307, USA. */ ...@@ -32,6 +32,7 @@ Boston, MA 02111-1307, USA. */
#include "toplev.h" #include "toplev.h"
#include "splay-tree.h" #include "splay-tree.h"
#include "ggc.h" #include "ggc.h"
#include "lex.h"
#include "obstack.h" #include "obstack.h"
#define obstack_chunk_alloc xmalloc #define obstack_chunk_alloc xmalloc
...@@ -465,8 +466,9 @@ build_vtable_entry_ref (basetype, vtbl, idx) ...@@ -465,8 +466,9 @@ build_vtable_entry_ref (basetype, vtbl, idx)
i = build_binary_op (MINUS_EXPR, i, i2); i = build_binary_op (MINUS_EXPR, i, i2);
i = build_tree_list (build_string (1, "i"), i); i = build_tree_list (build_string (1, "i"), i);
expand_asm_operands (build_string (sizeof(asm_stmt)-1, asm_stmt), finish_asm_stmt (ridpointers[RID_VOLATILE],
NULL_TREE, chainon (s, i), NULL_TREE, 1, NULL, 0); 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 /* Given an object INSTANCE, return an expression which yields the
...@@ -3860,18 +3862,14 @@ finish_struct_1 (t) ...@@ -3860,18 +3862,14 @@ finish_struct_1 (t)
my_friendly_assert (TYPE_FIELDS (t) == fields, 981117); my_friendly_assert (TYPE_FIELDS (t) == fields, 981117);
/* Delete all zero-width bit-fields from the front of the fieldlist */ /* Delete all zero-width bit-fields from 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)) tree *fieldsp = &fields;
&& DECL_INITIAL (TREE_CHAIN (x))) while (*fieldsp && TREE_CODE (*fieldsp) == FIELD_DECL)
TREE_CHAIN (x) = TREE_CHAIN (TREE_CHAIN (x)); if (DECL_C_BIT_FIELD (*fieldsp) && DECL_INITIAL (*fieldsp))
*fieldsp = TREE_CHAIN (*fieldsp);
else else
x = TREE_CHAIN (x); fieldsp = &TREE_CHAIN (*fieldsp);
} }
TYPE_FIELDS (t) = fields; TYPE_FIELDS (t) = fields;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment