This is the mail archive of the gcc-bugs@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]

[Bug c/69985] [6 Regression] ICE: in linemap_position_for_loc_and_offset, at libcpp/line-map.c:924


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69985

--- Comment #19 from Manuel LÃpez-IbÃÃez <manu at gcc dot gnu.org> ---
(In reply to Manuel LÃpez-IbÃÃez from comment #18)
> I don't really understand why this is the case: we seem to waste a lot of
> location numbers that do not point to anything. If there is a way to tell
> which map should encode a particular line,column, then we simply should use
> that map if there are free locations left to do so.

Perhaps by trying first

linemap_position_for_line_and_column (set, map, line, column+offset)

if that returns a location >= map[1].start_location, then if (line <
ORDINARY_MAP_STARTING_LINE_NUMBER (map+1)), try again with map++, until either
we run out of maps or the next map encodes a higher line, and in those cases we
give up.

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