gcc/libcpp
Jason Merrill 9e64426dae libcpp: location comparison within macro [PR100796]
The patch for 96391 changed linemap_compare_locations to give up on
comparing locations from macro expansions if we don't have column
information.  But in this testcase, the BOILERPLATE macro is multiple lines
long, so we do want to compare locations within the macro.  So this patch
moves the LINE_MAP_MAX_LOCATION_WITH_COLS check inside the block, to use it
for failing gracefully.

	PR c++/100796
	PR preprocessor/96391

libcpp/ChangeLog:

	* line-map.c (linemap_compare_locations): Only use comparison with
	LINE_MAP_MAX_LOCATION_WITH_COLS to avoid abort.

gcc/testsuite/ChangeLog:

	* g++.dg/plugin/location-overflow-test-pr100796.c: New test.
	* g++.dg/plugin/plugin.exp: Run it.
2021-06-16 11:41:08 -04:00
..
include c: Add support for __FILE_NAME__ macro (PR c/42579) 2021-05-20 08:12:41 +00:00
po
aclocal.m4
ChangeLog Daily bump. 2021-05-21 00:16:57 +00:00
ChangeLog.jit
charset.c
config.in
configure
configure.ac
directives.c preprocessor: Support C2X #elifdef, #elifndef 2021-05-11 23:54:01 +00:00
errors.c
expr.c
files.c
generated_cpp_wcwidth.h
identifiers.c
init.c c: Add support for __FILE_NAME__ macro (PR c/42579) 2021-05-20 08:12:41 +00:00
internal.h
lex.c libcpp: Fix up -fdirectives-only handling of // comments on last line not terminated with newline [PR100646] 2021-05-20 09:09:07 +02:00
line-map.c libcpp: location comparison within macro [PR100796] 2021-06-16 11:41:08 -04:00
location-example.txt
macro.c c: Add support for __FILE_NAME__ macro (PR c/42579) 2021-05-20 08:12:41 +00:00
Makefile.in
makeucnid.c
mkdeps.c
pch.c
symtab.c
system.h
traditional.c
ucnid.h
ucnid.tab