This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: source location reorg patch 1/n


Nathan Sidwell <nathan@codesourcery.com> writes:

> Zack,
> this is the non-trivial remainder of the source location reorganization.
> Following this I can incrementally change the source to hide the underlying
> representation of a location_t.

A couple of concerns:

> Index: scan.h
> ===================================================================
> RCS file: /cvs/gcc/gcc/gcc/scan.h,v
> retrieving revision 1.18
> diff -c -3 -p -r1.18 scan.h
> *** scan.h	1 May 2003 16:13:29 -0000	1.18
> --- scan.h	1 May 2003 16:58:42 -0000
> *************** extern int get_token _PARAMS ((FILE *, s
> *** 77,80 ****
>   extern int source_lineno;
>   extern sstring source_filename;
> - /* Current physical line number */
> - extern int input_line;
> --- 77,79 ----

This file is not part of GCC proper; it's part of fix-header, which is
not compiled on an ix86-linux target, so you wouldn't have noticed if
you broke it.  Do "make stmp-fixproto" in the gcc subdirectory of your
build tree to find out.  I suspect you'll need to drop this hunk.

> Index: java/parse-scan.y
> ===================================================================
> RCS file: /cvs/gcc/gcc/gcc/java/parse-scan.y,v
> retrieving revision 1.31
> diff -c -3 -p -r1.31 parse-scan.y
> *** java/parse-scan.y	1 May 2003 16:13:36 -0000	1.31
> --- java/parse-scan.y	1 May 2003 17:05:18 -0000
> *************** definitions and other extensions.  */
> *** 41,52 ****
>   #include "system.h"
>   #include "coretypes.h"
>   #include "tm.h"
> ! 
>   #include "obstack.h"
>   #include "toplev.h"
>   
> - extern char *input_filename;
>   extern FILE *finput, *out;
>   
>   /* Obstack for the lexer.  */
>   struct obstack temporary_obstack;
> --- 41,55 ----
>   #include "system.h"
>   #include "coretypes.h"
>   #include "tm.h"
> ! #include "input.h"
>   #include "obstack.h"
>   #include "toplev.h"
>   
>   extern FILE *finput, *out;
> +  
> + /* Current position in real source file.  */
> + 
> + location_t input_location;
>   
>   /* Obstack for the lexer.  */
>   struct obstack temporary_obstack;

Why is it necessary to declare input_location here?  Shouldn't this be
redundant with toplev.c?

zw


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