summaryrefslogtreecommitdiff
path: root/gcc/tree-inline.c
diff options
context:
space:
mode:
authorMike Stump <mrs@apple.com>2003-11-12 19:53:17 +0000
committerMike Stump <mrs@gcc.gnu.org>2003-11-12 19:53:17 +0000
commitd5123baefb715e5d861535910f3c82deb8675f22 (patch)
tree3688d9296922e3e7a321a8a99b5bbb6825b5345d /gcc/tree-inline.c
parentea81d2a3e1896a810829bc423cdb40eb9fb0a113 (diff)
downloadgcc-d5123baefb715e5d861535910f3c82deb8675f22.tar.gz
c-typeck.c (c_convert_parm_for_inlining): Add argnum...
* c-typeck.c (c_convert_parm_for_inlining): Add argnum, which is the argumnt we are processing so that warnings and errors will have that information. * c-tree.h (c_convert_parm_for_inlining): Add argnum. * lang-hooks-def.h (lhd_tree_inlining_convert_parm_for_inlining): Likewse. * langhooks.c (lhd_tree_inlining_convert_parm_for_inlining): Likewise. * langhooks.h (convert_parm_for_inlining): Likewise. * tree-inline.c (initialize_inlined_parameters): Compute and pass argnum down. From-SVN: r73507
Diffstat (limited to 'gcc/tree-inline.c')
-rw-r--r--gcc/tree-inline.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c
index 23467b9bb9b..66f5a82e484 100644
--- a/gcc/tree-inline.c
+++ b/gcc/tree-inline.c
@@ -729,9 +729,11 @@ initialize_inlined_parameters (inline_data *id, tree args, tree fn, tree block)
#ifdef INLINER_FOR_JAVA
tree vars = NULL_TREE;
#endif /* INLINER_FOR_JAVA */
+ int argnum = 0;
/* Figure out what the parameters are. */
- parms = DECL_ARGUMENTS (fn);
+ parms =
+DECL_ARGUMENTS (fn);
/* Start with no initializations whatsoever. */
init_stmts = NULL_TREE;
@@ -749,9 +751,11 @@ initialize_inlined_parameters (inline_data *id, tree args, tree fn, tree block)
tree value;
tree var_sub;
+ ++argnum;
+
/* Find the initializer. */
value = (*lang_hooks.tree_inlining.convert_parm_for_inlining)
- (p, a ? TREE_VALUE (a) : NULL_TREE, fn);
+ (p, a ? TREE_VALUE (a) : NULL_TREE, fn, argnum);
/* If the parameter is never assigned to, we may not need to
create a new variable here at all. Instead, we may be able