From e65e6212f7770bb37988649b8a56dc891bcea205 Mon Sep 17 00:00:00 2001 From: "Kaveh R. Ghazi" Date: Sun, 11 Aug 2002 18:30:25 +0000 Subject: [PATCH] decl2.c (build_call_from_tree): Fix uninitialized variable. * decl2.c (build_call_from_tree): Fix uninitialized variable. * parse.y (parse_finish_call_expr): Likewise. * repo.c (old_args, old_dir, old_main): Const-ify. From-SVN: r56208 --- gcc/cp/ChangeLog | 6 ++++++ gcc/cp/decl2.c | 5 ++++- gcc/cp/parse.y | 5 ++++- gcc/cp/repo.c | 2 +- 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index fe1802b796af..976fb1082ebb 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2002-08-11 Kaveh R. Ghazi + + * decl2.c (build_call_from_tree): Fix uninitialized variable. + * parse.y (parse_finish_call_expr): Likewise. + * repo.c (old_args, old_dir, old_main): Const-ify. + 2002-08-11 Gabriel Dos Reis * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE + diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index 9072e9e828ec..7b10a75c8145 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -3497,7 +3497,10 @@ build_call_from_tree (tree fn, tree args, bool disallow_virtual) fn = TREE_OPERAND (fn, 0); } else - template_id = NULL_TREE; + { + template_id = NULL_TREE; + template_args = NULL_TREE; + } f = (TREE_CODE (fn) == OVERLOAD) ? get_first_fn (fn) : fn; /* Make sure we have a baselink (rather than simply a diff --git a/gcc/cp/parse.y b/gcc/cp/parse.y index 1134939f8404..4fc870669bc7 100644 --- a/gcc/cp/parse.y +++ b/gcc/cp/parse.y @@ -4140,7 +4140,10 @@ parse_finish_call_expr (tree fn, tree args, int koenig) name = TREE_OPERAND (name, 0); } else - template_id = NULL_TREE; + { + template_id = NULL_TREE; + template_args = NULL_TREE; + } if (BASELINK_P (name)) fn = name; diff --git a/gcc/cp/repo.c b/gcc/cp/repo.c index e27d8c2199e9..64c6ec873fcc 100644 --- a/gcc/cp/repo.c +++ b/gcc/cp/repo.c @@ -47,7 +47,7 @@ static GTY(()) tree original_repo; static char *repo_name; static FILE *repo_file; -static char *old_args, *old_dir, *old_main; +static const char *old_args, *old_dir, *old_main; static struct obstack temporary_obstack; -- 2.47.3