unify line number handling patch 1

Zack Weinberg zack@codesourcery.com
Wed Apr 30 19:48:00 GMT 2003


Gabriel Dos Reis <gdr@integrable-solutions.net> writes:

> I wanted to do this kind of lifting some time ago.  Thanks for
> tackling it.
>
> Nathan Sidwell <nathan@codesourcery.com> writes:
>
> [...]
>
> | I couldn't simply #define lineno, as that is used in places as fieldname.
> | Something had to change and I felt input_line matched the name input_filename.
>
> I think we should just get rid of lineno and input_filename, and use a
> single object.  Save/Restore of "lineno, input_filename" is combersome. 

Yes.  That appears to be Nathan's ultimate goal, but it's not feasible
to get there in one giant step.

Nathan, I like the looks of your patch, but already it is so huge that
I can't find all the places where there are non-search-and-replace
changes, which makes review infeasible.

I pre-approve two patches: one that renames all the local variables
named 'input_filename' or 'input_line' and does nothing else, and
another that renames the 'lineno' global to 'input_line' and does
nothing else.  Put those in, then come back with the substantial
changes.

zw



More information about the Gcc-patches mailing list