From: Jason Merrill Date: Sun, 17 May 1998 14:54:24 +0000 (-0400) Subject: typeck.c (type_unknown_p): Return true for TREE_LIST also. X-Git-Tag: prereleases/egcs-1.1-prerelease~1254 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a31fe44eb31cd2acd68716a3702e7f821202ada0;p=thirdparty%2Fgcc.git 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 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index b18b5d4bc4e4..5f87d3a5d529 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,13 @@ +Sun May 17 14:52:08 1998 Martin v. Loewis + + * 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 + + * call.c (build_scoped_method_call): Likewise. + Sun May 17 13:53:48 1998 Mark Mitchell * init.c (build_new_1): Call suspend_momentary around the creation diff --git a/gcc/cp/call.c b/gcc/cp/call.c index 790d4765009f..b9df085b07b0 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 481467f27720..9e721ddf8a60 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));