From 3a2e5926e6f7b9353623b9d4aad695cc421b28d7 Mon Sep 17 00:00:00 2001 From: Per Bothner Date: Thu, 15 Mar 2001 22:12:53 -0800 Subject: [PATCH] jcf-parse.c (yyparse): Set/reset input_filename for source file. * jcf-parse.c (yyparse): Set/reset input_filename for source file. * parse.y (java_expand_classes): Likewise. From-SVN: r40541 --- gcc/java/ChangeLog | 5 ++++- gcc/java/jcf-parse.c | 2 ++ gcc/java/parse.y | 2 ++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index 578ea4ed16e..31c4d4c5a33 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,8 +1,11 @@ 2001-03-15 Per Bothner + * jcf-parse.c (yyparse): Set/reset input_filename for source file. + * parse.y (java_expand_classes): Likewise. + * parse.y (expand_start_java_method): Was only called once and had a misleading name, so inline in caller java_complete_expand_method. - (enter_a_block): Likewise inline in enter_blck and remove. + (enter_a_block): Likewise inline in enter_block and remove. Remove junk from when gcc/java was created (by copying from C/C++). * decl.c (keep_next_level_flag, keep_next_if_subblocks): Remove. diff --git a/gcc/java/jcf-parse.c b/gcc/java/jcf-parse.c index 6ace7e8134d..b7a4c0b95f2 100644 --- a/gcc/java/jcf-parse.c +++ b/gcc/java/jcf-parse.c @@ -1064,8 +1064,10 @@ yyparse () for (ctxp = ctxp_for_generation; ctxp; ctxp = ctxp->next) { + input_filename = ctxp->filename; parse_source_file_2 (); } + input_filename = main_input_filename; java_expand_classes (); if (!java_report_errors () && !flag_syntax_only) diff --git a/gcc/java/parse.y b/gcc/java/parse.y index b40de8e81e9..b29d1708435 100644 --- a/gcc/java/parse.y +++ b/gcc/java/parse.y @@ -8621,10 +8621,12 @@ java_expand_classes () for (; ctxp_for_generation; ctxp_for_generation = ctxp_for_generation->next) { ctxp = ctxp_for_generation; + input_filename = ctxp->filename; lang_init_source (2); /* Error msgs have method prototypes */ java_complete_expand_classes (); /* Complete and expand classes */ java_parse_abort_on_error (); } + input_filename = main_input_filename; /* Find anonymous classes and expand their constructor, now they have been fixed. */ -- 2.30.2