From 49860b4b8676914e5aba6441301b47fe158796e9 Mon Sep 17 00:00:00 2001 From: jason Date: Tue, 2 May 2000 05:25:27 +0000 Subject: [PATCH] * tree.c (walk_tree): Set lineno. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@33604 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/cp/ChangeLog | 8 ++++++-- gcc/cp/tree.c | 5 +++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index af9d5afafbe..1e96c5c0d53 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,7 @@ +2000-05-01 Jason Merrill + + * tree.c (walk_tree): Set lineno. + 2000-05-01 Mark Mitchell * exception.cc: Update license notice. @@ -123,9 +127,9 @@ 2000-04-24 Gabriel Dos Reis * call.c (standard_conversion): Accept conversion between - COMPLEX_TYPEs + COMPLEX_TYPEs. - * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE + * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE. 2000-04-24 Zack Weinberg diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c index 47209b2fa03..c3bdb1d8517 100644 --- a/gcc/cp/tree.c +++ b/gcc/cp/tree.c @@ -1245,6 +1245,11 @@ walk_tree (tp, func, data) { int i, len; + /* Set lineno here so we get the right instantiation context + if we call instantiate_decl from inlinable_function_p. */ + if (statement_code_p (code) && !STMT_LINENO_FOR_FN_P (*tp)) + lineno = STMT_LINENO (*tp); + /* Walk over all the sub-trees of this operand. */ len = first_rtl_op (code); /* TARGET_EXPRs are peculiar: operands 1 and 3 can be the same. -- 2.11.0