aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/parse.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/java/parse.c')
-rw-r--r--gcc/java/parse.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/gcc/java/parse.c b/gcc/java/parse.c
index 512738d..5a9e856 100644
--- a/gcc/java/parse.c
+++ b/gcc/java/parse.c
@@ -324,9 +324,9 @@ int java_error_count;
int java_warning_count;
/* The current parser context */
-static struct parser_ctxt *ctxp;
+struct parser_ctxt *ctxp;
-/* List of things that were anlyzed for which code will be generated */
+/* List of things that were analyzed for which code will be generated */
static struct parser_ctxt *ctxp_for_generation = NULL;
/* binop_lookup maps token to tree_code. It is used where binary
@@ -7921,6 +7921,11 @@ declare_local_variables (modifier, type, vlist)
decl = build_decl (VAR_DECL, name, real_type);
BLOCK_CHAIN_DECL (decl);
+ /* If doing xreferencing, replace the line number with the WFL
+ compound value */
+ if (flag_emit_xref)
+ DECL_SOURCE_LINE (decl) = EXPR_WFL_LINECOL (wfl);
+
/* Don't try to use an INIT statement when an error was found */
if (init && java_error_count)
init = NULL_TREE;