aboutsummaryrefslogtreecommitdiff
path: root/libcpp/include
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>2018-10-11 12:42:37 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2018-10-11 12:42:37 +0000
commitc1b48b29294ed58e72129db4db42adab3d0d1a9a (patch)
tree32a29d7459eecd3699a84f59acf2073799e71dbc /libcpp/include
parentc7790bdbd97889b39fde3e0249b398a9bf5fb43b (diff)
downloadgcc-c1b48b29294ed58e72129db4db42adab3d0d1a9a.zip
gcc-c1b48b29294ed58e72129db4db42adab3d0d1a9a.tar.gz
gcc-c1b48b29294ed58e72129db4db42adab3d0d1a9a.tar.bz2
[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
Diffstat (limited to 'libcpp/include')
-rw-r--r--libcpp/include/line-map.h2
1 files changed, 1 insertions, 1 deletions
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. */