diff options
author | Per Bothner <per@bothner.com> | 2005-02-11 22:12:40 -0800 |
---|---|---|
committer | Per Bothner <bothner@gcc.gnu.org> | 2005-02-11 22:12:40 -0800 |
commit | 7b45aab4226dff7e661073990ea4a98f5b3e0088 (patch) | |
tree | 8d7d8e61dc84237fee9ab7693129f6afe61f17c6 /gcc/java/lex.c | |
parent | f4ddadddf99edb3fd2ec0585c7463278d2f0e70c (diff) | |
download | gcc-7b45aab4226dff7e661073990ea4a98f5b3e0088.zip gcc-7b45aab4226dff7e661073990ea4a98f5b3e0088.tar.gz gcc-7b45aab4226dff7e661073990ea4a98f5b3e0088.tar.bz2 |
re PR java/15543 ("jv-scan --complexity" segfaults)
PR java/15543
* parse-scan.y (input_location): Remove variable.
(main_input_filename): New - replaces input_filename, which isn't
settable if USE_MAPPED_LOCATION.
* lex.c (java_init_lex): Wrap some more places in #ifndef JC1-LITE,
so we don't reference input_location or wfl_operator in that case.
* jv-scan.c (expand_location): Remove - no longer used.
(main): Set main_input_filename rather than input_filename.
From-SVN: r94928
Diffstat (limited to 'gcc/java/lex.c')
-rw-r--r-- | gcc/java/lex.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/gcc/java/lex.c b/gcc/java/lex.c index 712ffc2..d0a8f93 100644 --- a/gcc/java/lex.c +++ b/gcc/java/lex.c @@ -108,11 +108,13 @@ java_init_lex (FILE *finput, const char *encoding) if (!wfl_operator) { +#ifndef JC1_LITE #ifdef USE_MAPPED_LOCATION wfl_operator = build_expr_wfl (NULL_TREE, input_location); #else wfl_operator = build_expr_wfl (NULL_TREE, ctxp->filename, 0, 0); #endif +#endif } if (!label_id) label_id = get_identifier ("$L"); @@ -134,7 +136,9 @@ java_init_lex (FILE *finput, const char *encoding) ctxp->package = NULL_TREE; #endif +#ifndef JC1_LITE ctxp->save_location = input_location; +#endif ctxp->java_error_flag = 0; ctxp->lexer = java_new_lexer (finput, encoding); } @@ -1471,7 +1475,6 @@ do_java_lex (YYSTYPE *java_lval) #ifndef JC1_LITE java_lval->operator.token = OCB_TK; java_lval->operator.location = BUILD_LOCATION(); -#endif #ifdef USE_MAPPED_LOCATION if (ctxp->ccb_indent == 1) ctxp->first_ccb_indent1 = input_location; @@ -1479,14 +1482,14 @@ do_java_lex (YYSTYPE *java_lval) if (ctxp->ccb_indent == 1) ctxp->first_ccb_indent1 = input_line; #endif +#endif ctxp->ccb_indent++; return OCB_TK; case '}': + ctxp->ccb_indent--; #ifndef JC1_LITE java_lval->operator.token = CCB_TK; java_lval->operator.location = BUILD_LOCATION(); -#endif - ctxp->ccb_indent--; #ifdef USE_MAPPED_LOCATION if (ctxp->ccb_indent == 1) ctxp->last_ccb_indent1 = input_location; @@ -1494,6 +1497,7 @@ do_java_lex (YYSTYPE *java_lval) if (ctxp->ccb_indent == 1) ctxp->last_ccb_indent1 = input_line; #endif +#endif return CCB_TK; case '[': BUILD_OPERATOR (OSB_TK); |