This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Patch to Fix init_parse Problems


Hi,

Attached you will find a patch for egcs which fixes the problem with
init_parse not propogating filename changes back to compile_file in
toplev.c. All of the language specific version of init_parse now
return a char* containing the filename to be used.

I included updates to each ChangeLog, but I'm still not sure which
other ChangeLog.* variants to update. Please let me know if the patch
is OK and if you want me to check it in or if someone else is going to
do it.

Dave
cvs server: Diffing .
Index: ChangeLog
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/ChangeLog,v
retrieving revision 1.1090
diff -c -r1.1090 ChangeLog
*** ChangeLog	1998/04/14 10:33:07	1.1090
--- ChangeLog	1998/04/14 20:07:12
***************
*** 1,3 ****
--- 1,10 ----
+ Tue Apr 14 15:50:05 1998  Dave Brolley  <brolley@cygnus.com>
+ 
+ 	* toplev.c (compile_file): Call init_parse using new interface.
+ 	(init_lex): Remove declaration.
+ 
+ 	* c-lex.c (init_parse): Now returns char* containing filename.
+ 
  Tue Apr 14 11:31:28 1998  Krister Walfridsson <cato@df.lth.se>
  
  	* i386/bsd386.h (ASM_OUTPUT_ALIGN): Redefine.
Index: c-lex.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/c-lex.c,v
retrieving revision 1.15
diff -c -r1.15 c-lex.c
*** c-lex.c	1998/04/08 23:29:08	1.15
--- c-lex.c	1998/04/14 20:07:14
***************
*** 185,191 ****
        wordlist[i].name = "oneway";   
  }
  
! void
  init_parse (filename)
       char *filename;
  {
--- 185,191 ----
        wordlist[i].name = "oneway";   
  }
  
! char *
  init_parse (filename)
       char *filename;
  {
***************
*** 220,225 ****
--- 220,227 ----
    if (! cpp_start_read (&parse_in, filename))
      abort ();
  #endif
+ 
+   return filename;
  }
  
  void
Index: toplev.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/toplev.c,v
retrieving revision 1.53
diff -c -r1.53 toplev.c
*** toplev.c	1998/04/11 00:28:06	1.53
--- toplev.c	1998/04/14 20:07:18
***************
*** 131,138 ****
  extern int size_directive_output;
  extern tree last_assemble_variable_decl;
  
! extern void init_lex ();
! extern void init_parse PVPROTO((char *));
  extern void finish_parse ();
  extern void init_decl_processing ();
  extern void init_obstacks ();
--- 131,137 ----
  extern int size_directive_output;
  extern tree last_assemble_variable_decl;
  
! extern char *init_parse PVPROTO((char *));
  extern void finish_parse ();
  extern void init_decl_processing ();
  extern void init_obstacks ();
***************
*** 2274,2280 ****
  
    init_obstacks ();
    init_tree_codes ();
!   init_parse (name);
    init_rtl ();
    init_emit_once (debug_info_level == DINFO_LEVEL_NORMAL
  		  || debug_info_level == DINFO_LEVEL_VERBOSE
--- 2273,2279 ----
  
    init_obstacks ();
    init_tree_codes ();
!   name = init_parse (name);
    init_rtl ();
    init_emit_once (debug_info_level == DINFO_LEVEL_NORMAL
  		  || debug_info_level == DINFO_LEVEL_VERBOSE
Index: cp/ChangeLog
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/cp/ChangeLog,v
retrieving revision 1.325
diff -c -r1.325 ChangeLog
*** ChangeLog	1998/04/13 11:13:34	1.325
--- ChangeLog	1998/04/14 20:07:31
***************
*** 1,3 ****
--- 1,7 ----
+ Tue Apr 14 15:48:44 1998  Dave Brolley  <brolley@cygnus.com>
+ 
+ 	* lex.c (init_parse): Now returns char* containing the filename.
+ 
  Fri Apr 10 12:16:49 1998  Benjamin Kosnik  <bkoz@loony.cygnus.com>
  
  	* decl.c (duplicate_decls): Don't warn for redundant decls if
Index: cp/lex.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/cp/lex.c,v
retrieving revision 1.39
diff -c -r1.39 lex.c
*** lex.c	1998/04/09 20:36:43	1.39
--- lex.c	1998/04/14 20:07:35
***************
*** 455,461 ****
    return token_count;
  }
  
! void
  init_parse (filename)
       char *filename;
  {
--- 455,461 ----
    return token_count;
  }
  
! char *
  init_parse (filename)
       char *filename;
  {
***************
*** 890,895 ****
--- 890,897 ----
  
    token_count = init_cpp_parse ();
    interface_unknown = 1;
+ 
+   return filename;
  }
  
  void
cvs server: Diffing cp/inc
cvs server: Diffing f
Index: f/ChangeLog
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/f/ChangeLog,v
retrieving revision 1.21
diff -c -r1.21 ChangeLog
*** ChangeLog	1998/03/28 00:45:59	1.21
--- ChangeLog	1998/04/14 20:07:40
***************
*** 1,3 ****
--- 1,7 ----
+ Tue Apr 14 15:51:37 1998  Dave Brolley  <brolley@cygnus.com>
+ 
+ 	* com.c (init_parse): Now returns char* containing filename;
+ 
  Mon Mar 23 11:58:43 1998  Craig Burley  <burley@gnu.org>
  
  	* bugs.texi: Various updates.
Index: f/com.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/f/com.c,v
retrieving revision 1.23
diff -c -r1.23 com.c
*** com.c	1998/04/08 23:30:08	1.23
--- com.c	1998/04/14 20:07:56
***************
*** 14795,14801 ****
    ffe_init_0 ();
  }
  
! void
  init_parse (filename)
       char *filename;
  {
--- 14795,14801 ----
    ffe_init_0 ();
  }
  
! char *
  init_parse (filename)
       char *filename;
  {
***************
*** 14824,14829 ****
--- 14824,14831 ----
  #if BUILT_FOR_270
    print_error_function = lang_print_error_function;
  #endif
+ 
+   return filename;
  }
  
  void

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]