]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
parse.y (struct parser_ctxt *ctxp): Now global.
authorAlexandre Petit-Bianco <apbianco@cygnus.com>
Mon, 5 Apr 1999 12:00:08 +0000 (12:00 +0000)
committerAlexandre Petit-Bianco <apbianco@gcc.gnu.org>
Mon, 5 Apr 1999 12:00:08 +0000 (05:00 -0700)
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.

From-SVN: r26201

gcc/java/ChangeLog
gcc/java/parse.c
gcc/java/parse.y

index 4ae22f108e59267bcf6b51117bb6e8cc9e14d9cf..737a03b292f9a83a614d21bac76b0e94b5582f2b 100644 (file)
@@ -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.
index 512738d9f4fa40ffe30a592850dcfc15b1c30064..5a9e85670b3c206612f6c33f2ee82f8f3787eb23 100644 (file)
@@ -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;
index 7ab2ef6ef26f0e266466828e1a8517303d064f17..2afbddee3ad60b648d061355017a7d798fc2a9fe 100644 (file)
@@ -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;