line-map question

Per Bothner per@bothner.com
Tue Apr 19 21:49:00 GMT 2005


Devang Patel wrote:
>  From line_map comment at (libcpp/include/line-map.h)
> 
> /* Physical source file TO_FILE at line TO_LINE at column 0 is  represented
>    by the logical START_LOCATION.  TO_LINE+L at column C is  represented by
>    START_LOCATION+(L*(1<<column_bits))+C, as long as C< (1<<column_bits),
> 
> What happens when column number is >= 128 ?

The exact same rule applies.  There is nothing magic about 128, except
it's an initial value that hopefully covers > 90% of the case.  If it
doesn't, the code will increase column_bits, either by allocating a
new line_map, or (in a few cases) tweaking the existing one.  The
latter is what is happening in PR 20907.

 > This is PR 20907.

I have a patch I'll check in after testing.
-- 
	--Per Bothner
per@bothner.com   http://per.bothner.com/



More information about the Gcc mailing list