This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] preprocessor/58580 - preprocessor goes OOM with warning for zero literals
- From: Tom Tromey <tromey at redhat dot com>
- To: Dodji Seketeli <dodji at redhat dot com>
- Cc: Jakub Jelinek <jakub at redhat dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Manuel LÃpez-IbÃÃez <lopezibanez at gmail dot com>, Bernd Edlinger <bernd dot edlinger at hotmail dot de>
- Date: Mon, 09 Dec 2013 13:11:32 -0700
- Subject: Re: [PATCH] preprocessor/58580 - preprocessor goes OOM with warning for zero literals
- Authentication-results: sourceware.org; auth=none
- References: <DUB122-W32B887B9B78C252A2B9146E40B0 at phx dot gbl> <20131031144309 dot GR27813 at tucnak dot zalov dot cz> <87y559xz7y dot fsf at redhat dot com> <20131031173649 dot GW27813 at tucnak dot zalov dot cz> <87zjpbb5qu dot fsf at redhat dot com> <20131111142159 dot GZ27813 at tucnak dot zalov dot cz> <878uwuap4f dot fsf at redhat dot com> <878uwt63e2 dot fsf at redhat dot com> <20131113081610 dot GH27813 at tucnak dot zalov dot cz> <87zjp7t73c dot fsf at redhat dot com>
>>>>> "Dodji" == Dodji Seketeli <dodji@redhat.com> writes:
Dodji> * include/line-map.h (linemap_get_file_highest_location): Declare
Dodji> new function.
Dodji> * line-map.c (linemap_get_file_highest_location): Define it.
I wasn't sure if this is the patch you were needing review for ...
Dodji> +bool linemap_get_file_highest_location (struct line_maps * set,
Dodji> + const char *file_name,
Dodji> + source_location*LOC);
The spacing is slight off -- one too many before "set", one too few
before LOC. And LOC presumably shouldn't be uppercase here.
Dodji> + const char *fname = set->info_ordinary.maps[i].d.ordinary.to_file;
Dodji> + if (fname && !strcmp (fname, file_name))
Other spots in this code use filename_cmp.
Otherwise the libcpp bits look ok to me.
Tom