diff options
author | Mark Mitchell <mark@codesourcery.com> | 2003-03-13 19:57:12 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2003-03-13 19:57:12 +0000 |
commit | 26f86471531d569c550a3e16fbd88a0cae6f18dd (patch) | |
tree | d2580badfc894825e324e272981797cd242d90e3 /gcc/cp/decl.c | |
parent | 7210d5ae56f8e4230a227fcfd000015b6df6224e (diff) | |
download | gcc-26f86471531d569c550a3e16fbd88a0cae6f18dd.zip gcc-26f86471531d569c550a3e16fbd88a0cae6f18dd.tar.gz gcc-26f86471531d569c550a3e16fbd88a0cae6f18dd.tar.bz2 |
call.c (initialize_reference): Remove bogus assertion.
* call.c (initialize_reference): Remove bogus assertion.
* decl.c (build_ptrmemfunc_type): Revert change of 2003-03-09.
* g++.dg/init/ref5.C: New test.
* g++.dg/parse/ptrmem1.C: Likewise.
From-SVN: r64316
Diffstat (limited to 'gcc/cp/decl.c')
-rw-r--r-- | gcc/cp/decl.c | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index eeae35a..1763c41 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -9297,49 +9297,11 @@ build_ptrmemfunc_type (tree type) { tree field, fields; tree t; - tree method_type; - tree arg_type; tree unqualified_variant = NULL_TREE; if (type == error_mark_node) return type; - /* If the METHOD_TYPE has any default parameters, make a copy that - does not have the default parameters. The pointer-to-member type - never has default parameters. */ - method_type = TREE_TYPE (type); - for (arg_type = TYPE_ARG_TYPES (method_type); - arg_type; - arg_type = TREE_CHAIN (arg_type)) - if (TREE_PURPOSE (arg_type)) - { - /* At least one parameter has a default argument. */ - tree arg_types = NULL_TREE; - tree *arg_type_p = &arg_types; - - /* Copy the parameter types. The "this" parameter will be - added by build_cplus_method_type. */ - for (arg_type = TREE_CHAIN (TYPE_ARG_TYPES (method_type)); - arg_type; - arg_type = TREE_CHAIN (arg_type)) - { - if (arg_type == void_list_node) - *arg_type_p = void_list_node; - else - *arg_type_p = build_tree_list (NULL_TREE, - TREE_VALUE (arg_type)); - arg_type_p = &TREE_CHAIN (*arg_type_p); - } - /* Build the new METHOD_TYPE. */ - method_type = build_cplus_method_type (TYPE_METHOD_BASETYPE (method_type), - TREE_TYPE (method_type), - arg_types); - /* Build the new POINTER_TYPE. */ - type = cp_build_qualified_type (build_pointer_type (method_type), - cp_type_quals (type)); - break; - } - /* If a canonical type already exists for this type, use it. We use this method instead of type_hash_canon, because it only does a simple equality check on the list of field members. */ |