From 96c169e15643ebffb7144837a54c760331d91c21 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Wed, 14 Oct 2009 12:04:22 +0200 Subject: re PR preprocessor/41543 (BUILTINS_LOCATION wrong with -fpreprocessed) 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. From-SVN: r152761 --- libcpp/include/line-map.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libcpp/include/line-map.h') diff --git a/libcpp/include/line-map.h b/libcpp/include/line-map.h index 31ac8e5..9e31a6a 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) -- cgit v1.1