Commit e86d9e4b by Hans-Peter Nilsson Committed by Hans-Peter Nilsson

expr.c (expr_add_location): Move declaration to before all statements.

	* expr.c (expr_add_location): Move declaration to before all
	statements.
	* parse.y (java_expand_classes): Ditto.
	* lex.c (java_peek_unicode): Ditto.

From-SVN: r89152
parent d8d3480a
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> 2004-10-16 Ranjit Mathew <rmathew@hotmail.com>
* check-init.c: Use %<, %> and %q for quoting in diagnostics, * check-init.c: Use %<, %> and %q for quoting in diagnostics,
......
...@@ -3239,15 +3239,15 @@ build_expr_wfl (tree node, ...@@ -3239,15 +3239,15 @@ build_expr_wfl (tree node,
) )
{ {
tree wfl; tree wfl;
static const char *last_file = 0;
static tree last_filenode = NULL_TREE;
#ifdef USE_MAPPED_LOCATION #ifdef USE_MAPPED_LOCATION
wfl = make_node (EXPR_WITH_FILE_LOCATION); wfl = make_node (EXPR_WITH_FILE_LOCATION);
SET_EXPR_LOCATION (wfl, location); SET_EXPR_LOCATION (wfl, location);
#else #else
wfl = make_node (EXPR_WITH_FILE_LOCATION); 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); EXPR_WFL_SET_LINECOL (wfl, line, col);
if (file != last_file) if (file != last_file)
{ {
......
...@@ -544,9 +544,10 @@ java_peek_unicode (void) ...@@ -544,9 +544,10 @@ java_peek_unicode (void)
{ {
int unicode_escape_p; int unicode_escape_p;
java_lexer *lex = ctxp->lexer; java_lexer *lex = ctxp->lexer;
int next;
if (lex->avail_unicode) if (lex->avail_unicode)
return lex->next_unicode; return lex->next_unicode;
int next;
next = java_read_unicode (lex, &unicode_escape_p); next = java_read_unicode (lex, &unicode_escape_p);
......
...@@ -9173,13 +9173,14 @@ java_expand_classes (void) ...@@ -9173,13 +9173,14 @@ java_expand_classes (void)
{ {
int save_error_count = 0; int save_error_count = 0;
static struct parser_ctxt *cur_ctxp = NULL; static struct parser_ctxt *cur_ctxp = NULL;
location_t save_location;
java_parse_abort_on_error (); java_parse_abort_on_error ();
if (!(ctxp = ctxp_for_generation)) if (!(ctxp = ctxp_for_generation))
return; return;
java_layout_classes (); java_layout_classes ();
java_parse_abort_on_error (); 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) for (cur_ctxp = ctxp_for_generation; cur_ctxp; cur_ctxp = cur_ctxp->next)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment