diff options
| author | hp <hp@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-10-16 18:27:32 +0000 |
|---|---|---|
| committer | hp <hp@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-10-16 18:27:32 +0000 |
| commit | ef20f6a7d0e0cc21d4580ea4d0cee0ebbbd7974e (patch) | |
| tree | 5991300f51345a99721ef7c031ce48c1320a6133 | |
| parent | 7ef8f77cf9356c5589927bbe7c0218dd55dafd6a (diff) | |
| download | ppe42-gcc-ef20f6a7d0e0cc21d4580ea4d0cee0ebbbd7974e.tar.gz ppe42-gcc-ef20f6a7d0e0cc21d4580ea4d0cee0ebbbd7974e.zip | |
* expr.c (expr_add_location): Move declaration to before all
statements.
* parse.y (java_expand_classes): Ditto.
* lex.c (java_peek_unicode): Ditto.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@89152 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | gcc/java/ChangeLog | 7 | ||||
| -rw-r--r-- | gcc/java/expr.c | 6 | ||||
| -rw-r--r-- | gcc/java/lex.c | 3 | ||||
| -rw-r--r-- | gcc/java/parse.y | 3 |
4 files changed, 14 insertions, 5 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index 07d2c718a2e..1f23930459e 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,10 @@ +2004-10-16 Hans-Peter Nilsson <hp@bitrange.com> + + * expr.c (expr_add_location): Move declaration to before all + statements. + * parse.y (java_expand_classes): Ditto. + * lex.c (java_peek_unicode): Ditto. + 2004-10-16 Ranjit Mathew <rmathew@hotmail.com> * check-init.c: Use %<, %> and %q for quoting in diagnostics, diff --git a/gcc/java/expr.c b/gcc/java/expr.c index 13727151967..70156cf80f9 100644 --- a/gcc/java/expr.c +++ b/gcc/java/expr.c @@ -3239,15 +3239,15 @@ build_expr_wfl (tree node, ) { tree wfl; + static const char *last_file = 0; + static tree last_filenode = NULL_TREE; + #ifdef USE_MAPPED_LOCATION wfl = make_node (EXPR_WITH_FILE_LOCATION); SET_EXPR_LOCATION (wfl, location); #else wfl = make_node (EXPR_WITH_FILE_LOCATION); - static const char *last_file = 0; - static tree last_filenode = NULL_TREE; - EXPR_WFL_SET_LINECOL (wfl, line, col); if (file != last_file) { diff --git a/gcc/java/lex.c b/gcc/java/lex.c index 54df7badd22..712ffc2c589 100644 --- a/gcc/java/lex.c +++ b/gcc/java/lex.c @@ -544,9 +544,10 @@ java_peek_unicode (void) { int unicode_escape_p; java_lexer *lex = ctxp->lexer; + int next; + if (lex->avail_unicode) return lex->next_unicode; - int next; next = java_read_unicode (lex, &unicode_escape_p); diff --git a/gcc/java/parse.y b/gcc/java/parse.y index 9e050f65eea..a2d09bbc7db 100644 --- a/gcc/java/parse.y +++ b/gcc/java/parse.y @@ -9173,13 +9173,14 @@ java_expand_classes (void) { int save_error_count = 0; static struct parser_ctxt *cur_ctxp = NULL; + location_t save_location; java_parse_abort_on_error (); if (!(ctxp = ctxp_for_generation)) return; java_layout_classes (); java_parse_abort_on_error (); - location_t save_location = input_location; + save_location = input_location; for (cur_ctxp = ctxp_for_generation; cur_ctxp; cur_ctxp = cur_ctxp->next) { |

