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
..
include c-family: Macro support in -Wmisleading-indentation [PR80076] 2020-09-17 14:27:22 -04:00
po Daily bump. 2020-07-21 00:16:28 +00:00
ChangeLog Daily bump. 2020-10-21 00:16:36 +00:00
ChangeLog.jit
Makefile.in
aclocal.m4
charset.c diagnostics: Support conversion of tabs to spaces [PR49973] [PR86904] 2020-07-14 12:05:56 -04:00
config.in
configure Require CET support only for the final GCC build 2020-07-30 05:36:24 -07:00
configure.ac
directives.c cpplib: Macro use location and comparison 2020-11-02 08:56:38 -08:00
errors.c
expr.c cpplib: Macro use location and comparison 2020-11-02 08:56:38 -08:00
files.c libcpp: Directly peek for initial line marker 2020-10-08 12:16:21 -07:00
generated_cpp_wcwidth.h
identifiers.c
init.c preprocessor: Fix non-fn fn-like macro at EOF [PR97471] 2020-10-19 08:00:41 -07:00
internal.h cpplib: Macro use location and comparison 2020-11-02 08:56:38 -08:00
lex.c preprocessor: Further fix for EOF in macro args [PR97471] 2020-10-20 08:01:34 -07:00
line-map.c c-family: Macro support in -Wmisleading-indentation [PR80076] 2020-09-17 14:27:22 -04:00
location-example.txt
macro.c cpplib: Macro use location and comparison 2020-11-02 08:56:38 -08:00
makeucnid.c
mkdeps.c
pch.c
symtab.c
system.h
traditional.c preprocessor: Teach traditional about has_include [PR95889] 2020-07-29 07:47:21 -07:00
ucnid.h
ucnid.tab