aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/decl.c
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2002-06-25 15:35:27 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>2002-06-25 15:35:27 +0000
commitda15dae6f5381cc92e8149ae3da488bb2e1cb843 (patch)
tree4ca1f7c859dc3343629d8f2edb008c7742b347f6 /gcc/cp/decl.c
parent16b460352a7af477072fb686f3def6388edefd92 (diff)
downloadgcc-da15dae6f5381cc92e8149ae3da488bb2e1cb843.zip
gcc-da15dae6f5381cc92e8149ae3da488bb2e1cb843.tar.gz
gcc-da15dae6f5381cc92e8149ae3da488bb2e1cb843.tar.bz2
call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
* call.c (build_op_delete_call): Use BASELINK_FUNCTIONS. * class.c (handle_using_decl): Likewise. (instantiate_type): Likewise. * cp-tree.h (BASELINK_FUNCTIONS): New macro. (xref_basetypes): Change prototype. (begin_mem_initializers): New function. (get_overloaded_fn): Likewise. * decl.c (xref_basetypes): Simplify. * error.c (dump_expr): Use BASELINK_FUNCTIONS. * init.c (build_offset_ref): Likewise. * parse.y (base_init): Use begin_mem_initializers(). (structsp): Adjust call to xref_basetypes. * pt.c (determine_specialization): Use BASELINK_FUNCTIONS. (instantiate_class_template): Adjust call to xref_basetypes. * semantics.c (begin_mem_initializers): New function. * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS. (really_overlaoded_fn): Likewise. (get_overloaded_fn): New function.' (get_first_fn): USe BASELINK_FUNCTIONS. From-SVN: r54989
Diffstat (limited to 'gcc/cp/decl.c')
-rw-r--r--gcc/cp/decl.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 3a6e7a1..1b1975a 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -12983,9 +12983,7 @@ xref_tag_from_type (old, id, globalize)
struct, or union. */
void
-xref_basetypes (code_type_node, name, ref, binfo)
- tree code_type_node;
- tree name ATTRIBUTE_UNUSED;
+xref_basetypes (ref, binfo)
tree ref;
tree binfo;
{
@@ -12997,21 +12995,14 @@ xref_basetypes (code_type_node, name, ref, binfo)
int i, len;
enum tag_types tag_code;
- /* If we are called from the parser, code_type_node will sometimes be a
- TREE_LIST. This indicates that the user wrote
- "class __attribute__ ((foo)) bar". Extract the attributes so that
- tree_low_cst doesn't crash. */
- if (TREE_CODE (code_type_node) == TREE_LIST)
- code_type_node = TREE_VALUE (code_type_node);
-
- tag_code = (enum tag_types) tree_low_cst (code_type_node, 1);
-
- if (tag_code == union_type)
+ if (TREE_CODE (ref) == UNION_TYPE)
{
error ("derived union `%T' invalid", ref);
return;
}
+ tag_code = (CLASSTYPE_DECLARED_CLASS (ref) ? class_type : record_type);
+
len = list_length (binfo);
/* First, make sure that any templates in base-classes are