jcf-parse.c (yyparse): Set/reset input_filename for source file.
authorPer Bothner <per@bothner.com>
Fri, 16 Mar 2001 06:12:53 +0000 (22:12 -0800)
committerPer Bothner <bothner@gcc.gnu.org>
Fri, 16 Mar 2001 06:12:53 +0000 (22:12 -0800)
* jcf-parse.c (yyparse):  Set/reset input_filename for source file.
* parse.y (java_expand_classes):  Likewise.

From-SVN: r40541

gcc/java/ChangeLog
gcc/java/jcf-parse.c
gcc/java/parse.y

index 578ea4ed16ed8899db8a0b1d1926dfae9994c6e5..31c4d4c5a33f929b891e593651a2b252b4296efd 100644 (file)
@@ -1,8 +1,11 @@
 2001-03-15  Per Bothner  <per@bothner.com>
 
+       * 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.
index 6ace7e8134d0cbeb79680dbe2fc9a72011957fc9..b7a4c0b95f26847a5624a3a921a585dd2301240d 100644 (file)
@@ -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)
index b40de8e81e9b15caccc12732934fb777c72428ec..b29d1708435b75d839f979681a04f3f25df2002f 100644 (file)
@@ -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. */