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]
Other format: [Raw text]

Re: change the location_t type, DECL_SOURCE_LINE etc


Per Bothner wrote:-

> Neil Booth wrote:
> 
> >This is great; we've been planning to do this for a while.
> >But please use (or modify if you have to, though you shouldn't need
> >to) line-map.c; it provides the line -> (file, line) mapping already
> >for cpplib; I've wanted to get the whole compiler using it for a while.
> 
> I'm don't understand what you're suggesting.  It appears to me that
> the line-map stuctues are solving a different problem tham I am,
> which is how to compactly represent file/line[/column] pairs[/triples].

line-maps compress file/line into 32 bits.  They don't hold column
info; since when I suggested it before it wasn't popular.  The 32-bit
line is convertible into a file / line combination when necessary (which
at the moment is during diagnostics, and at the front-end / CPP
interface, since the front ends don't use the line maps yet.  If they
did, it would only be necessary during asm output, and everything else
could use the 32-bit number).

I added other stuff to it; it also handles -H dumps and file stack
printing from diagnostics; using line-map for this meant these two
features became available for preprocessed input in addition to normal
input.

What don't you understand about them?

Neil.


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