diff options
author | Mark Mitchell <mark@codesourcery.com> | 2003-08-25 15:47:43 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2003-08-25 15:47:43 +0000 |
commit | 43dc123f52541ec779e4b56541203cec16c18d80 (patch) | |
tree | c70318c3104fdbdeeae37e278eef3a2220c321b4 /gcc/cp/decl.c | |
parent | a30b6839178e57250791bd821f332151afaffba5 (diff) | |
download | gcc-43dc123f52541ec779e4b56541203cec16c18d80.zip gcc-43dc123f52541ec779e4b56541203cec16c18d80.tar.gz gcc-43dc123f52541ec779e4b56541203cec16c18d80.tar.bz2 |
re PR target/8795 ([PPC] Altivec related bugs concerning gcc 3.3 and mainline)
PR c++/8795
* tree.h (build_method_type_directly): Declare.
* c-common.c (handle_vector_size_attributes): Handle METHOD_TYPEs.
(vector_size_helper): Likewise.
* tree.c (build_method_type_directly): New function.
(build_method_type): Use it.
PR c++/8795
* cp-tree.h (build_cplus_method_type): Remove.
* call.c (standard_conversion): Use build_method_type_directly
instead of build_cplus_method_type.
* class.c (build_clone): Likewise.
(adjust_clone_args): Likewise.
* decl.c (build_ptrmem_type): Likewise.
(grokdeclarator): Likewise.
(check_function_type): Likewise.
* decl2.c (grok_method_quals): Likewise.
(maybe_retrofit_in_chrg): Likewise.
* pt.c (copy_default_args_to_explicit_spec): Likewise.
(tsubst_function_type): Likewise.
(tsubst): Likewise.
* tree.c (build_cplus_method_type): Remove.
* typeck.c (merge_types): Use build_method_type_directly.
PR c++/8795
* g++.dg/ext/altivec-1.C: New test.
From-SVN: r70773
Diffstat (limited to 'gcc/cp/decl.c')
-rw-r--r-- | gcc/cp/decl.c | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index dc3495f..d89ec91 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -9259,9 +9259,9 @@ build_ptrmem_type (tree class_type, tree member_type) (class_type, cp_type_quals (TREE_TYPE (TREE_VALUE (arg_types))))); member_type - = build_cplus_method_type (class_type, - TREE_TYPE (member_type), - TREE_CHAIN (arg_types)); + = build_method_type_directly (class_type, + TREE_TYPE (member_type), + TREE_CHAIN (arg_types)); return build_ptrmemfunc_type (build_pointer_type (member_type)); } else @@ -10933,7 +10933,9 @@ grokdeclarator (tree declarator, else if (TREE_CODE (type) == FUNCTION_TYPE) { if (current_class_type == NULL_TREE || friendp) - type = build_cplus_method_type (ctype, TREE_TYPE (type), + type + = build_method_type_directly (ctype, + TREE_TYPE (type), TYPE_ARG_TYPES (type)); else { @@ -10975,8 +10977,9 @@ grokdeclarator (tree declarator, /* In this case, we will deal with it later. */ ; else if (TREE_CODE (type) == FUNCTION_TYPE) - type = build_cplus_method_type (ctype, TREE_TYPE (type), - TYPE_ARG_TYPES (type)); + type = build_method_type_directly (ctype, + TREE_TYPE (type), + TYPE_ARG_TYPES (type)); } } break; @@ -11412,8 +11415,9 @@ grokdeclarator (tree declarator, } } else if (staticp < 2) - type = build_cplus_method_type (ctype, TREE_TYPE (type), - TYPE_ARG_TYPES (type)); + type = build_method_type_directly (ctype, + TREE_TYPE (type), + TYPE_ARG_TYPES (type)); } /* Tell grokfndecl if it needs to set TREE_PUBLIC on the node. */ @@ -11649,8 +11653,9 @@ grokdeclarator (tree declarator, } } else if (TREE_CODE (type) == FUNCTION_TYPE && staticp < 2) - type = build_cplus_method_type (ctype, TREE_TYPE (type), - TYPE_ARG_TYPES (type)); + type = build_method_type_directly (ctype, + TREE_TYPE (type), + TYPE_ARG_TYPES (type)); /* Record presence of `static'. */ publicp = (ctype != NULL_TREE @@ -13317,9 +13322,9 @@ check_function_type (tree decl, tree current_function_parms) { tree ctype = TREE_TYPE (TREE_VALUE (TYPE_ARG_TYPES (fntype))); TREE_TYPE (decl) - = build_cplus_method_type (ctype, - void_type_node, - FUNCTION_ARG_CHAIN (decl)); + = build_method_type_directly (ctype, + void_type_node, + FUNCTION_ARG_CHAIN (decl)); } else TREE_TYPE (decl) |