From c1b48b29294ed58e72129db4db42adab3d0d1a9a Mon Sep 17 00:00:00 2001 From: Nathan Sidwell Date: Thu, 11 Oct 2018 12:42:37 +0000 Subject: [PATCH] A couple of line map fixes https://gcc.gnu.org/ml/gcc-patches/2018-10/msg00623.html * include/line-map.h (LINEMAPS_MACRO_LOWEST_LOCATION): Fix off-by-one error. * line-map.c (linemap_enter_macro): Use RAII. Clear all of the macro_locations. From-SVN: r265037 --- libcpp/include/line-map.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libcpp/include') diff --git a/libcpp/include/line-map.h b/libcpp/include/line-map.h index c479dfa..23f0e4a 100644 --- a/libcpp/include/line-map.h +++ b/libcpp/include/line-map.h @@ -1017,7 +1017,7 @@ LINEMAPS_MACRO_LOWEST_LOCATION (const line_maps *set) { return LINEMAPS_MACRO_USED (set) ? MAP_START_LOCATION (LINEMAPS_LAST_MACRO_MAP (set)) - : MAX_SOURCE_LOCATION; + : MAX_SOURCE_LOCATION + 1; } /* Returns the last macro map allocated in the line table SET. */ -- cgit v1.1