diff options
author | Jason Merrill <jason@gcc.gnu.org> | 1998-05-17 10:54:24 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 1998-05-17 10:54:24 -0400 |
commit | a31fe44eb31cd2acd68716a3702e7f821202ada0 (patch) | |
tree | 634aa1589947990f889e6baf4f43df9c1e3c44e3 | |
parent | 1702d32ea7e8974b5146d445612960e6ddf6dca4 (diff) | |
download | gcc-a31fe44eb31cd2acd68716a3702e7f821202ada0.zip gcc-a31fe44eb31cd2acd68716a3702e7f821202ada0.tar.gz gcc-a31fe44eb31cd2acd68716a3702e7f821202ada0.tar.bz2 |
typeck.c (type_unknown_p): Return true for TREE_LIST also.
* typeck.c (type_unknown_p): Return true for TREE_LIST also.
* call.c (build_method_call): Use TYPE_MAIN_VARIANT on typedefs.
* call.c (build_scoped_method_call): Likewise.
From-SVN: r19820
-rw-r--r-- | gcc/cp/ChangeLog | 10 | ||||
-rw-r--r-- | gcc/cp/call.c | 6 | ||||
-rw-r--r-- | gcc/cp/typeck.c | 1 |
3 files changed, 15 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index b18b5d4..5f87d3a 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,13 @@ +Sun May 17 14:52:08 1998 Martin v. Loewis <loewis@informatik.hu-berlin.de> + + * typeck.c (type_unknown_p): Return true for TREE_LIST also. + + * call.c (build_method_call): Use TYPE_MAIN_VARIANT on typedefs. + +Sun May 17 14:51:41 1998 Jason Merrill <jason@yorick.cygnus.com> + + * call.c (build_scoped_method_call): Likewise. + Sun May 17 13:53:48 1998 Mark Mitchell <mmitchell@usa.net> * init.c (build_new_1): Call suspend_momentary around the creation diff --git a/gcc/cp/call.c b/gcc/cp/call.c index 790d476..b9df085 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -392,7 +392,8 @@ build_scoped_method_call (exp, basetype, name, parms) exp, basetype, type); name = TREE_OPERAND (name, 0); if (TYPE_MAIN_VARIANT (basetype) != name - && basetype != get_type_value (name)) + && (TYPE_MAIN_VARIANT (basetype) + != TYPE_MAIN_VARIANT (get_type_value (name)))) cp_error ("qualified type `%T' does not match destructor name `~%T'", basetype, name); return cp_convert (void_type_node, exp); @@ -639,7 +640,8 @@ build_method_call (instance, name, parms, basetype_path, flags) if (! (name == TYPE_MAIN_VARIANT (basetype) || (IS_AGGR_TYPE (basetype) && name == constructor_name (basetype)) - || basetype == get_type_value (name))) + || (TYPE_MAIN_VARIANT (basetype) + == TYPE_MAIN_VARIANT (get_type_value (name))))) { cp_error ("destructor name `~%D' does not match type `%T' of expression", name, basetype); diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c index 481467f..9e721dd 100644 --- a/gcc/cp/typeck.c +++ b/gcc/cp/typeck.c @@ -165,6 +165,7 @@ type_unknown_p (exp) tree exp; { return (TREE_CODE (exp) == OVERLOAD + || TREE_CODE (exp) == TREE_LIST || TREE_TYPE (exp) == unknown_type_node || (TREE_CODE (TREE_TYPE (exp)) == OFFSET_TYPE && TREE_TYPE (TREE_TYPE (exp)) == unknown_type_node)); |