diff options
author | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-07-26 20:10:43 +0000 |
---|---|---|
committer | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-07-26 20:10:43 +0000 |
commit | d145d8d59b4e67d69e610d8664788abba73af3d1 (patch) | |
tree | 9feb5c92f6ca92e0e155d86992b0be0d7a2f82a6 /gcc/cp/decl.c | |
parent | 7b469a92baa0e3b84e21a8f8ccb3294a1aa737f6 (diff) | |
download | gcc-d145d8d59b4e67d69e610d8664788abba73af3d1.tar.gz |
* function.c (assign_parms): Handle frontend-directed pass by
invisible reference.
cp/
* call.c (build_over_call): Likewise.
(cp_convert_parm_for_inlining): New fn.
(convert_for_arg_passing): New fn.
(convert_default_arg, build_over_call): Use it.
(type_passed_as): New fn.
* pt.c (tsubst_decl): Use it.
* decl2.c (cp_build_parm_decl): New fn.
(build_artificial_parm): Use it.
(start_static_storage_duration_function): Likewise.
* decl.c (start_cleanup_fn, grokdeclarater): Likewise.
(grokparms): Don't mess with DECL_ARG_TYPE.
* typeck.c (convert_arguments): Use convert_for_arg_passing.
* cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
Define.
* cp-tree.h: Declare new fns.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@55781 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/decl.c')
-rw-r--r-- | gcc/cp/decl.c | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 337107baf62..14021a411d1 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -8518,9 +8518,8 @@ start_cleanup_fn () { tree parmdecl; - parmdecl = build_decl (PARM_DECL, NULL_TREE, ptr_type_node); + parmdecl = cp_build_parm_decl (NULL_TREE, ptr_type_node); DECL_CONTEXT (parmdecl) = fndecl; - DECL_ARG_TYPE (parmdecl) = ptr_type_node; TREE_USED (parmdecl) = 1; DECL_ARGUMENTS (fndecl) = parmdecl; } @@ -11366,7 +11365,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist) for (args = TYPE_ARG_TYPES (type); args; args = TREE_CHAIN (args)) { - tree decl = build_decl (PARM_DECL, NULL_TREE, TREE_VALUE (args)); + tree decl = cp_build_parm_decl (NULL_TREE, TREE_VALUE (args)); TREE_CHAIN (decl) = decls; decls = decl; @@ -11510,17 +11509,10 @@ friend declaration requires class-key, i.e. `friend %#T'", if (decl_context == PARM) { - decl = build_decl (PARM_DECL, declarator, type); + decl = cp_build_parm_decl (declarator, type); bad_specifiers (decl, "parameter", virtualp, quals != NULL_TREE, inlinep, friendp, raises != NULL_TREE); - - /* Compute the type actually passed in the parmlist, - for the case where there is no prototype. - (For example, shorts and chars are passed as ints.) - When there is a prototype, this is overridden later. */ - - DECL_ARG_TYPE (decl) = type_promotes_to (type); } else if (decl_context == FIELD) { @@ -12206,11 +12198,6 @@ grokparms (first_parm) decl, ptr ? "pointer" : "reference", t); } - DECL_ARG_TYPE (decl) = TREE_TYPE (decl); - if (PROMOTE_PROTOTYPES - && INTEGRAL_TYPE_P (type) - && TYPE_PRECISION (type) < TYPE_PRECISION (integer_type_node)) - DECL_ARG_TYPE (decl) = integer_type_node; if (!any_error && init) init = check_default_argument (decl, init); else |