summaryrefslogtreecommitdiffstats
path: root/libcpp/include
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2009-10-14 10:04:22 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2009-10-14 10:04:22 +0000
commitaf4d2883043b329ee34322d616b88eb0e2b42fa5 (patch)
tree1d09c51355f1f205dbfff2b154b3beaa1ef84a15 /libcpp/include
parent9a46ebcd91e94d938fcd5a573a8b83c27ce6626c (diff)
downloadppe42-gcc-af4d2883043b329ee34322d616b88eb0e2b42fa5.tar.gz
ppe42-gcc-af4d2883043b329ee34322d616b88eb0e2b42fa5.zip
PR preprocessor/41543
* input.h (BUILTINS_LOCATION): Change to 1 from 2. Assert BUILTINS_LOCATION < RESERVED_LOCATION_COUNT. * tree.c: Include intl.h. (expand_location): Handle BUILTINS_LOCATION. * Makefile.in (tree.o): Depend on intl.h. * include/line-map.h (RESERVED_LOCATION_COUNT): Define. * line-map.c (linemap_init): Initialize highest_location and highest_line to RESERVED_LOCATION_COUNT-1 instead of 0. * gcc.dg/debug/dwarf2/pr41543.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@152761 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libcpp/include')
-rw-r--r--libcpp/include/line-map.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/libcpp/include/line-map.h b/libcpp/include/line-map.h
index 31ac8e5d4c3..9e31a6ae3b9 100644
--- a/libcpp/include/line-map.h
+++ b/libcpp/include/line-map.h
@@ -143,6 +143,11 @@ extern const struct line_map *linemap_add
extern const struct line_map *linemap_lookup
(struct line_maps *, source_location);
+/* source_location values from 0 to RESERVED_LOCATION_COUNT-1 will
+ be reserved for libcpp user as special values, no token from libcpp
+ will contain any of those locations. */
+#define RESERVED_LOCATION_COUNT 2
+
/* Converts a map and a source_location to source line. */
#define SOURCE_LINE(MAP, LOC) \
((((LOC) - (MAP)->start_location) >> (MAP)->column_bits) + (MAP)->to_line)
OpenPOWER on IntegriCloud