aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorKaveh Ghazi <ghazi@gcc.gnu.org>1998-10-05 21:31:14 +0000
committerKaveh Ghazi <ghazi@gcc.gnu.org>1998-10-05 21:31:14 +0000
commitd64db93fbcb807f996f5b7204603c18893a7b0b9 (patch)
tree6182471fd6e8cc721c8e3044bdbbdf844105fdd1 /gcc
parent08d292de2001aa502cb556681a341f16766102ec (diff)
downloadgcc-d64db93fbcb807f996f5b7204603c18893a7b0b9.zip
gcc-d64db93fbcb807f996f5b7204603c18893a7b0b9.tar.gz
gcc-d64db93fbcb807f996f5b7204603c18893a7b0b9.tar.bz2
call.c (build_object_call): Move declaration of variable `fn' into the scope where it is used.
* call.c (build_object_call): Move declaration of variable `fn' into the scope where it is used. Don't access variable `fn' when it is uninitialized, instead use `fns'. From-SVN: r22850
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/call.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/cp/call.c b/gcc/cp/call.c
index 808c11b..31c198a 100644
--- a/gcc/cp/call.c
+++ b/gcc/cp/call.c
@@ -2394,13 +2394,12 @@ build_object_call (obj, args)
{
tree fns = TREE_VALUE (convs);
tree totype = TREE_TYPE (TREE_TYPE (OVL_CURRENT (fns)));
- tree fn;
if (TREE_CODE (totype) == POINTER_TYPE
&& TREE_CODE (TREE_TYPE (totype)) == FUNCTION_TYPE)
- for (; fns; fns = OVL_NEXT (fn))
+ for (; fns; fns = OVL_NEXT (fns))
{
- fn = OVL_CURRENT (fn);
+ tree fn = OVL_CURRENT (fns);
if (TREE_CODE (fn) == TEMPLATE_DECL)
{
templates = scratch_tree_cons (NULL_TREE, fn, templates);