This is the mail archive of the gcc-patches@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: [libcpp,lto,fortran PATCH] Fix linemap_add use and remove unnecessary kludge


Hello Richard,

Richard Guenther <richard.guenther@gmail.com> writes:

> In the LTO FE the two linemap_add calls were to advance the location
> counter to cover the builtin special locations.  You exchange these
> with only one - that doesn't look correct without more explanation.

It seems to me that you don't need to worry about advancing the location
counter to cover builtin special locations because the lowest possible
location that could be handed out by the line map is set to
RESERVED_LOCATION_COUNT.  You can see that by looking at linemap_init
that sets the initial highest location to RESERVED_LOCATION_COUNT - 1,
and at linemap_add that sets the starting location of the added map to
the highest location + 1.  And RESERVED_LOCATION is set to 2 in
line-map.h.

> The PCH change is ok.

Thank you.

-- 
		Dodji


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