diff options
author | Alexandre Petit-Bianco <apbianco@cygnus.com> | 1998-05-15 17:32:40 +0000 |
---|---|---|
committer | Jim Wilson <wilson@gcc.gnu.org> | 1998-05-15 10:32:40 -0700 |
commit | b24f65cddd02f22d6ae7f3d7a89904fe3041b9ae (patch) | |
tree | d0e1ea4877528601326b16e545b6c2aa1b02eed7 | |
parent | c1465d214794ae6ce6cdd9d7c1bc5c0e7d2bd545 (diff) | |
download | gcc-b24f65cddd02f22d6ae7f3d7a89904fe3041b9ae.zip gcc-b24f65cddd02f22d6ae7f3d7a89904fe3041b9ae.tar.gz gcc-b24f65cddd02f22d6ae7f3d7a89904fe3041b9ae.tar.bz2 |
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.
From-SVN: r19778
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/expr.c | 17 |
2 files changed, 20 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 725b7e3..d4023be 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +Fri May 15 17:26:18 1998 Alexandre Petit-Bianco <apbianco@cygnus.com> + + * 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. + Fri May 15 12:44:57 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com> * stor-layout.c (set_sizetype): Set TYPE_NAME on bitsizetype. @@ -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); |