summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorapbianco <apbianco@138bc75d-0d04-0410-961f-82ee72b054a4>1999-04-05 12:00:08 +0000
committerapbianco <apbianco@138bc75d-0d04-0410-961f-82ee72b054a4>1999-04-05 12:00:08 +0000
commit5944eb82c108b03f91b25c44c2d70d12cd1fc37a (patch)
treed784f537cd199cf415f196248e87a5ab5e0b9413
parente13af58f8b8a68f4aab6ebf69d487b24929dbae3 (diff)
downloadgcc-5944eb82c108b03f91b25c44c2d70d12cd1fc37a.tar.gz
Mon Apr 5 11:24:19 1999 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (struct parser_ctxt *ctxp): Now global. (declare_local_variables): Use WFL compound value for the declaration source line value, when doing cross-referencing. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@26201 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/java/ChangeLog6
-rw-r--r--gcc/java/parse.c9
-rw-r--r--gcc/java/parse.y9
3 files changed, 20 insertions, 4 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index 4ae22f108e5..737a03b292f 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,3 +1,9 @@
+Mon Apr 5 11:24:19 1999 Alexandre Petit-Bianco <apbianco@cygnus.com>
+
+ * parse.y (struct parser_ctxt *ctxp): Now global.
+ (declare_local_variables): Use WFL compound value for the
+ declaration source line value, when doing cross-referencing.
+
1999-03-31 Tom Tromey <tromey@cygnus.com>
* gjavah.c (print_field_info): Allow constants of other types.
diff --git a/gcc/java/parse.c b/gcc/java/parse.c
index 512738d9f4f..5a9e85670b3 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;
diff --git a/gcc/java/parse.y b/gcc/java/parse.y
index 7ab2ef6ef26..2afbddee3ad 100644
--- a/gcc/java/parse.y
+++ b/gcc/java/parse.y
@@ -248,9 +248,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
@@ -5320,6 +5320,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;