gcc/libcpp
Nathan Sidwell e9a2e208dd cpplib: Macro use location and comparison
Our macro use hook passes a location, but doesn't recieve it from the
using location.  This patch adds the extra location_t parameter and
passes it though.

A second cleanup is breaking out the macro comparison code from the
redefinition warning.  That;ll turn out useful for modules.

Finally, there's a filename comparison needed for the location
optimization of rewinding from line 2 (occurs during the emission of
builtin macros).

	libcpp/
	* internal.h (_cpp_notify_macro_use): Add location parm.
	(_cpp_maybe_notify_macro_use): Likewise.
	* directives.c (_cpp_do_file_change): Check we've not changed file
	when optimizing a rewind.
	(do_ifdef): Pass location to _cpp_maybe_notify_macro_use.
	(do_ifndef): Likewise.  Delete obsolete comment about powerpc.
	* expr.c (parse_defined): Pass location to
	_cpp_maybe_notify_macro_use.
	* macro.c (enter_macro_context): Likewise.
	(warn_of_redefinition): Break out helper function.  Call it.
	(compare_macros): New function broken out of warn_of_redefinition.
	(_cpp_new_macro): Zero all fields.
	(_cpp_notify_macro_use): Add location parameter.
2020-11-02 08:56:38 -08:00
..
2020-07-21 00:16:28 +00:00
2020-10-21 00:16:36 +00:00
2020-01-01 12:51:42 +01:00
2020-01-20 05:39:59 -08:00
2020-01-01 12:51:42 +01:00
2020-01-01 12:51:42 +01:00
2020-05-19 13:23:47 -07:00
2020-01-01 12:51:42 +01:00
2020-01-01 12:51:42 +01:00