This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: Linemap force location and remove LINEMAP_POSITION_FOR_COLUMN (issue4801090)
- From: Gabriel Charette <gchare at google dot com>
- To: Dodji Seketeli <dodji at seketeli dot org>, Tom Tromey <tromey at redhat dot com>
- Cc: reply at codereview dot appspotmail dot com, crowl at google dot com, dnovillo at google dot com, gcc-patches at gcc dot gnu dot org, fortran at gcc dot gnu dot org
- Date: Thu, 18 Aug 2011 09:47:34 -0700
- Subject: Re: Linemap force location and remove LINEMAP_POSITION_FOR_COLUMN (issue4801090)
- References: <20110816003729.5C11A1C0F8B@gchare.mtv.corp.google.com> <m3mxf7by9g.fsf@seketeli.org>
Tom: ok for trunk?
fortran@: The fortran change just reflects the fix from libcpp,
fortran bootstrap and tests passed.
Thanks,
Gabriel
On Wed, Aug 17, 2011 at 1:04 PM, Dodji Seketeli <dodji@seketeli.org> wrote:
> Hello Gabriel,
>
> gchare@google.com (Gabriel Charette) a écrit:
>
>> Here is the updated patch.
>>
>> It nows exposes two libcpp functions to force the source_location for tokens when desired.
>>
>> The lexer then checks for a value set by these functions in cpp_reader and acts accordingly when needing a location for a new token (either using the forced_location or calling the linemap as it used to).
>>
>> It turns out the fortran library made the same mistake of creating a line_table entry for builtins, I fixed it as well in this patch.
>>
>> Tested on x64 for c++,fortran.
>>
>> (fyi: I moved the removal of LINEMAP_POSITION_FOR_COLUMN to a separate patch which is checked-in already; thus it doesn't show up in this updated patch obviously.
>> )
>>
>> Ok for trunk?
>>
>> Gabriel
>>
>> 2011-08-15 ?Gabriel Charette ?<gchare@google.com>
>>
>> ? ? ? gcc/c-family/ChangeLog
>> ? ? ? * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
>> ? ? ? defined in cpp_init_builtins and c_cpp_builtins.
>>
>> ? ? ? gcc/fortran/ChangeLog
>> ? ? ? * cpp.c (gfc_cpp_init): Force BUILTINS_LOCATION for tokens
>> ? ? ? defined in cpp_define_builtins.
>>
>> ? ? ? libcpp/ChangeLog
>> ? ? ? * init.c (cpp_create_reader): Inititalize forced_token_location_p.
>> ? ? ? * internal.h (struct cpp_reader): Add field forced_token_location_p.
>> ? ? ? * lex.c (_cpp_lex_direct): Use forced_token_location_p.
>> ? ? ? (cpp_force_token_locations): New.
>> ? ? ? (cpp_stop_forcing_token_locations): New.
>
> I cannot approve or reject this patch, but FWIW, it looks OK to me.
>
> Thanks.
>
> --
> ? ? ? ? ? ? ? ?Dodji
>