aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Merrill <jason@yorick.cygnus.com>1998-06-10 10:50:44 +0000
committerJason Merrill <jason@gcc.gnu.org>1998-06-10 06:50:44 -0400
commit1be04112a9ff60192580f59d7109f085540acb41 (patch)
tree087b0fcb7c5f16bf723227ac9823cade5a401396
parent07fb7f791dcaef1b7951d7e33e065981719b83d4 (diff)
downloadgcc-1be04112a9ff60192580f59d7109f085540acb41.zip
gcc-1be04112a9ff60192580f59d7109f085540acb41.tar.gz
gcc-1be04112a9ff60192580f59d7109f085540acb41.tar.bz2
* call.c (build_method_call): Fix thinko.
From-SVN: r20413
-rw-r--r--gcc/cp/ChangeLog3
-rw-r--r--gcc/cp/call.c18
2 files changed, 10 insertions, 11 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index d264552..33780b8 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,7 +1,6 @@
1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
- * call.c (build_scoped_method_call): Fix thinko.
- (build_method_call): Likewise.
+ * call.c (build_method_call): Fix thinko.
1998-06-10 Dave Brolley <brolley@cygnus.com>
diff --git a/gcc/cp/call.c b/gcc/cp/call.c
index 3a82b30..173bdde 100644
--- a/gcc/cp/call.c
+++ b/gcc/cp/call.c
@@ -397,7 +397,7 @@ build_scoped_method_call (exp, basetype, name, parms)
/* OK */;
else if (TREE_CODE (tmp) == IDENTIFIER_NODE)
{
- if (IS_AGGR_TYPE (basetype) && name == constructor_name (basetype))
+ if (IS_AGGR_TYPE (basetype) && tmp == constructor_name (basetype))
tmp = basetype;
else
tmp = get_type_value (tmp);
@@ -648,21 +648,21 @@ build_method_call (instance, name, parms, basetype_path, flags)
{
tree tmp;
- flags |= LOOKUP_DESTRUCTOR;
- name = TREE_OPERAND (name, 0);
+ tmp = name = TREE_OPERAND (name, 0);
+
if (parms)
error ("destructors take no parameters");
basetype = TREE_TYPE (instance);
if (TREE_CODE (basetype) == REFERENCE_TYPE)
basetype = TREE_TYPE (basetype);
- if (TREE_CODE (name) == TYPE_DECL)
- tmp = TREE_TYPE (name);
- else if (TREE_CODE_CLASS (TREE_CODE (name)) == 't')
- tmp = name;
- else if (TREE_CODE (name) == IDENTIFIER_NODE)
+ if (TREE_CODE (tmp) == TYPE_DECL)
+ tmp = TREE_TYPE (tmp);
+ else if (TREE_CODE_CLASS (TREE_CODE (tmp)) == 't')
+ /* OK */;
+ else if (TREE_CODE (tmp) == IDENTIFIER_NODE)
{
- if (IS_AGGR_TYPE (basetype) && name == constructor_name (basetype))
+ if (IS_AGGR_TYPE (basetype) && tmp == constructor_name (basetype))
tmp = basetype;
else
tmp = get_type_value (tmp);