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/jv-scan.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/jv-scan.c')
-rw-r--r-- | gcc/java/jv-scan.c | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/gcc/java/jv-scan.c b/gcc/java/jv-scan.c index 5f90ee9..b7b8809 100644 --- a/gcc/java/jv-scan.c +++ b/gcc/java/jv-scan.c @@ -131,29 +131,6 @@ version (void) exit (0); } -#ifdef USE_MAPPED_LOCATION -/* FIXME - this is the same as the function in tree.c, which is awkward. - Probably the cleanest solution is to move the function to line-map.c. - This is difficult as long as we still support --disable-mapped-location, - since whether expanded_location has a column fields depends on - USE_MAPPED_LOCATION. */ - -expanded_location -expand_location (source_location loc) -{ - expanded_location xloc; - if (loc == 0) { xloc.file = NULL; xloc.line = 0; xloc.column = 0; } - else - { - const struct line_map *map = linemap_lookup (&line_table, loc); - xloc.file = map->to_file; - xloc.line = SOURCE_LINE (map, loc); - xloc.column = SOURCE_COLUMN (map, loc); - }; - return xloc; -} -#endif - /* jc1-lite main entry point */ int main (int argc, char **argv) @@ -237,8 +214,7 @@ main (int argc, char **argv) if (encoding == NULL || *encoding == '\0') encoding = DEFAULT_ENCODING; - input_filename = filename; - input_line = 0; + main_input_filename = filename; java_init_lex (finput, encoding); ctxp->filename = filename; yyparse (); |