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] preprocessor/58580 - preprocessor goes OOM with warning for zero literals


>>>>> "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


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