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: line-map question


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/


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