summaryrefslogtreecommitdiffstats
path: root/gcc/expr.c
diff options
context:
space:
mode:
authorwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>1998-05-15 17:32:40 +0000
committerwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>1998-05-15 17:32:40 +0000
commite8832c238ee8feb3b05a9f60c15b05305fb58622 (patch)
treed0e1ea4877528601326b16e545b6c2aa1b02eed7 /gcc/expr.c
parentae219122a664144b03e007a98f3a7ce011825f38 (diff)
downloadppe42-gcc-e8832c238ee8feb3b05a9f60c15b05305fb58622.tar.gz
ppe42-gcc-e8832c238ee8feb3b05a9f60c15b05305fb58622.zip
Patch from Alex Petit-Bianco.
* expr.c (expand_expr, case EXPR_WITH_FILE_LOCATION): Save/restore input_filename and lineno around expand_expr call. Set them to values in WFL before expand_expr call. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@19778 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/expr.c')
-rw-r--r--gcc/expr.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index dcbde150588..34f744db7f3 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -5171,9 +5171,20 @@ expand_expr (exp, target, tmode, modifier)
return TREE_CST_RTL (exp);
case EXPR_WITH_FILE_LOCATION:
- if (EXPR_WFL_EMIT_LINE_NOTE (exp))
- emit_line_note (EXPR_WFL_FILENAME (exp), EXPR_WFL_LINENO (exp));
- return expand_expr (EXPR_WFL_NODE (exp), target, tmode, modifier);
+ {
+ rtx to_return;
+ char *saved_input_filename = input_filename;
+ int saved_lineno = lineno;
+ input_filename = EXPR_WFL_FILENAME (exp);
+ lineno = EXPR_WFL_LINENO (exp);
+ if (EXPR_WFL_EMIT_LINE_NOTE (exp))
+ emit_line_note (input_filename, lineno);
+ /* Possibly avoid switching back and force here */
+ to_return = expand_expr (EXPR_WFL_NODE (exp), target, tmode, modifier);
+ input_filename = saved_input_filename;
+ lineno = saved_lineno;
+ return to_return;
+ }
case SAVE_EXPR:
context = decl_function_context (exp);
OpenPOWER on IntegriCloud