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: [PATCH 3/7] Emit macro expansion related diagnostics


On 09/20/2011 03:23 AM, Dodji Seketeli wrote:
Jason Merrill<jason@redhat.com> writes:

Certainly all the calls to tokens_buff_add_token pass src->src_loc for
the second.  So why don't we look up the second location in the macro
definition when we need it rather than store a copy in the map?

Because when you have the first location, looking up the second is not easy.

In linemap_macro_map_loc_to_def_point you get the token number and then use that to index into MACRO_MAP_LOCATIONS. Can't you use the same token number to index into macro->exp.tokens instead?


Jason


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